mirror of
https://github.com/OpenBankProject/API-Explorer.git
synced 2026-02-06 10:47:23 +00:00
feature/Add props set_response_header_Set-Cookie
This commit is contained in:
parent
0291d421b3
commit
108acdf77f
@ -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"
|
||||
@ -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
|
||||
)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user