From fec57f47ae423673a2f8780df2533aeffc30f4d1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 17 May 2021 03:39:31 +0000 Subject: [PATCH] Revert "authenticate,proxy: add same site lax to cookies (#2159)" (#2203) (#2204) This reverts commit d9cc26a2e0020db1cc9b046a596152a07609387a. Co-authored-by: bobby <1544881+desimone@users.noreply.github.com> --- authenticate/state.go | 2 -- internal/sessions/cookie/cookie_store.go | 2 -- proxy/state.go | 2 -- 3 files changed, 6 deletions(-) diff --git a/authenticate/state.go b/authenticate/state.go index 20f1e8e48..317c39be1 100644 --- a/authenticate/state.go +++ b/authenticate/state.go @@ -5,7 +5,6 @@ import ( "crypto/cipher" "encoding/base64" "fmt" - "net/http" "net/url" "sync/atomic" @@ -118,7 +117,6 @@ func newAuthenticateStateFromConfig(cfg *config.Config) (*authenticateState, err Secure: cfg.Options.CookieSecure, HTTPOnly: cfg.Options.CookieHTTPOnly, Expire: cfg.Options.CookieExpire, - SameSite: http.SameSiteLaxMode, } }, state.sharedEncoder) if err != nil { diff --git a/internal/sessions/cookie/cookie_store.go b/internal/sessions/cookie/cookie_store.go index a8b2a21a5..a06d9f9dd 100644 --- a/internal/sessions/cookie/cookie_store.go +++ b/internal/sessions/cookie/cookie_store.go @@ -42,7 +42,6 @@ type Options struct { Expire time.Duration HTTPOnly bool Secure bool - SameSite http.SameSite } // A GetOptionsFunc is a getter for cookie options. @@ -93,7 +92,6 @@ func (cs *Store) makeCookie(value string) *http.Cookie { HttpOnly: opts.HTTPOnly, Secure: opts.Secure, Expires: timeNow().Add(opts.Expire), - SameSite: opts.SameSite, } } diff --git a/proxy/state.go b/proxy/state.go index be7edf257..54cc082ea 100644 --- a/proxy/state.go +++ b/proxy/state.go @@ -3,7 +3,6 @@ package proxy import ( "crypto/cipher" "encoding/base64" - "net/http" "net/url" "sync/atomic" "time" @@ -86,7 +85,6 @@ func newProxyStateFromConfig(cfg *config.Config) (*proxyState, error) { Secure: cfg.Options.CookieSecure, HTTPOnly: cfg.Options.CookieHTTPOnly, Expire: cfg.Options.CookieExpire, - SameSite: http.SameSiteLaxMode, } }, state.encoder) if err != nil {