fix: same site cookie
This commit is contained in:
parent
d8ea0c656f
commit
aa6601e62c
|
@ -36,8 +36,9 @@ func SetSession(gc *gin.Context, sessionID string) {
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
|
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
|
||||||
// https://github.com/gin-gonic/gin/blob/master/context.go#L86
|
// https://github.com/gin-gonic/gin/blob/master/context.go#L86
|
||||||
// TODO add ability to sameSite = none / strict from dashboard
|
// TODO add ability to sameSite = none / strict from dashboard
|
||||||
|
if !appCookieSecure {
|
||||||
gc.SetSameSite(http.SameSiteLaxMode)
|
gc.SetSameSite(http.SameSiteLaxMode)
|
||||||
|
}
|
||||||
// TODO allow configuring from dashboard
|
// TODO allow configuring from dashboard
|
||||||
year := 60 * 60 * 24 * 365
|
year := 60 * 60 * 24 * 365
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user