Skip to content

Commit aa6601e

Browse files
committed
fix: same site cookie
1 parent d8ea0c6 commit aa6601e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/cookie/cookie.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,9 @@ func SetSession(gc *gin.Context, sessionID string) {
3636
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
3737
// https://github.com/gin-gonic/gin/blob/master/context.go#L86
3838
// TODO add ability to sameSite = none / strict from dashboard
39-
gc.SetSameSite(http.SameSiteLaxMode)
40-
39+
if !appCookieSecure {
40+
gc.SetSameSite(http.SameSiteLaxMode)
41+
}
4142
// TODO allow configuring from dashboard
4243
year := 60 * 60 * 24 * 365
4344

0 commit comments

Comments
 (0)