internal: fix redis session store (#7011)

This commit is contained in:
Jens L 2023-09-28 21:06:27 +02:00 committed by GitHub
parent 8752148e6e
commit efb2823391
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -45,9 +45,11 @@ func (a *Application) getStore(p api.ProxyOutpostConfig, externalHost *url.URL)
rs.KeyPrefix(RedisKeyPrefix)
rs.Options(sessions.Options{
HttpOnly: strings.ToLower(externalHost.Scheme) == "https",
HttpOnly: true,
Secure: strings.ToLower(externalHost.Scheme) == "https",
Domain: *p.CookieDomain,
SameSite: http.SameSiteLaxMode,
MaxAge: maxAge,
})
a.log.Trace("using redis session backend")