feature/Add props set_response_header_Set-Cookie

This commit is contained in:
Marko Milić 2023-11-14 15:49:35 +01:00
parent 0291d421b3
commit 108acdf77f
2 changed files with 14 additions and 1 deletions

View File

@ -185,4 +185,6 @@ session_inactivity_timeout_in_minutes = 30
# Please note that depricated name ot this props is: language_tag
default_locale = en_GB
default_locale = en_GB
set_response_header_Set-Cookie = "Path=/; HttpOnly; Secure"

View File

@ -247,5 +247,16 @@ class Boot extends MdcLoggable{
// Do not change default value
}
val setCookieHeader: (String, String) = Props.get("set_response_header_Set-Cookie") match {
case Full(value) => ("Set-Cookie", value)
case _ => ("Set-Cookie", "Path=/; HttpOnly; Secure")
}
//for XSS vulnerability, set X-Frame-Options header as DENY
LiftRules.supplementalHeaders.default.set(
("X-Frame-Options", "DENY") ::
setCookieHeader ::
Nil
)
}
}