You've already forked oauth2-proxy
mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2025-06-25 00:47:17 +02:00
Add configuration for cookie 'SameSite' value.
Values of 'lax' and 'strict' can improve and mitigate some categories of cross-site traffic tampering. Given that the nature of this proxy is often to proxy private tools, this is useful to take advantage of. See: https://www.owasp.org/index.php/SameSite
This commit is contained in:
@ -372,6 +372,12 @@ func (o *Options) Validate() error {
|
||||
}
|
||||
}
|
||||
|
||||
switch o.CookieSameSite {
|
||||
case "", "none", "lax", "strict":
|
||||
default:
|
||||
msgs = append(msgs, fmt.Sprintf("cookie_samesite (%s) must be one of ['', 'lax', 'strict', 'none']", o.CookieSameSite))
|
||||
}
|
||||
|
||||
msgs = parseSignatureKey(o, msgs)
|
||||
msgs = validateCookieName(o, msgs)
|
||||
msgs = setupLogger(o, msgs)
|
||||
|
Reference in New Issue
Block a user