outpost/proxy: set samesite none

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-09-08 22:06:44 +02:00
parent b9c605bf1a
commit f7afb60c1f

View file

@ -2,6 +2,7 @@ package application
import (
"fmt"
"net/http"
"strconv"
"github.com/gorilla/sessions"
@ -18,10 +19,12 @@ func GetStore(p api.ProxyOutpostConfig) sessions.Store {
panic(err)
}
rs.Options.Domain = *p.CookieDomain
rs.Options.SameSite = http.SameSiteNoneMode
store = rs
} else {
cs := sessions.NewCookieStore([]byte(*p.CookieSecret))
cs.Options.Domain = *p.CookieDomain
cs.Options.SameSite = http.SameSiteNoneMode
store = cs
}
return store