From e6c5468a592fe9ece92f2f536a1f652a3cf02e03 Mon Sep 17 00:00:00 2001 From: Denis Arh Date: Mon, 24 Sep 2018 07:50:25 +0200 Subject: [PATCH] More precise cookie baking --- auth/rest/oidc.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/auth/rest/oidc.go b/auth/rest/oidc.go index 193d53c73..2c3dc84da 100644 --- a/auth/rest/oidc.go +++ b/auth/rest/oidc.go @@ -189,13 +189,13 @@ func (c *openIdConnect) setStateCookie(w http.ResponseWriter, r *http.Request, v // Store state to cookie as well http.SetCookie(w, &http.Cookie{ - Name: openIdConnectStateCookie, - Value: value, - + Name: openIdConnectStateCookie, + Value: value, Expires: time.Now().Add(time.Duration(c.stateCookieExpiry) * time.Minute), MaxAge: maxAge, HttpOnly: true, Secure: r.URL.Scheme == "https", Path: "/oidc", + Domain: ".rustbucket.io", // @todo make this configurable (like stateCookieExpiry) }) }