From 7e95c756b90eafc7d1263848be368badd9431455 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 21 May 2022 13:21:45 +0200 Subject: [PATCH] internal: set SameSite for outpost Signed-off-by: Jens Langhammer --- internal/outpost/proxyv2/application/session.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/outpost/proxyv2/application/session.go b/internal/outpost/proxyv2/application/session.go index 94b8d641d..d2be5c76b 100644 --- a/internal/outpost/proxyv2/application/session.go +++ b/internal/outpost/proxyv2/application/session.go @@ -3,6 +3,7 @@ package application import ( "fmt" "math" + "net/http" "net/url" "os" "strconv" @@ -30,6 +31,7 @@ func (a *Application) getStore(p api.ProxyOutpostConfig, externalHost *url.URL) } rs.Options.Path = externalHost.Path rs.Options.Domain = *p.CookieDomain + rs.Options.SameSite = http.SameSiteNoneMode a.log.Trace("using redis session backend") store = rs } else { @@ -51,6 +53,7 @@ func (a *Application) getStore(p api.ProxyOutpostConfig, externalHost *url.URL) } cs.Options.Path = externalHost.Path cs.Options.Domain = *p.CookieDomain + cs.Options.SameSite = http.SameSiteNoneMode a.log.WithField("dir", dir).Trace("using filesystem session backend") store = cs }