fix: improve interceptor handling (#3578)

* fix: improve interceptor handling

* fix: improve interceptor handling

Co-authored-by: Florian Forster <[email protected]>
This commit is contained in:
Livio Amstutz
2022-05-02 15:26:54 +00:00
committed by GitHub
co-authored by Florian Forster
parent 20f275f178
commit 06a1b52adf
9 changed files with 81 additions and 28 deletions
+7
View File
@@ -136,4 +136,11 @@ func (c *CookieHandler) httpSet(w http.ResponseWriter, name, domain, value strin
Secure: c.secureOnly,
SameSite: c.sameSite,
})
varyValues := w.Header().Values("vary")
for _, vary := range varyValues {
if vary == "Cookie" {
return
}
}
w.Header().Add("vary", "Cookie")
}