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