mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:07:31 +00:00
fix: cookie handling (#654)
* feat: set cookie prefix and max age * cookie prefix on csrf cookie * fix: check user agent cookie in login * update oidc pkg * cleanup
This commit is contained in:
@@ -41,13 +41,13 @@ var (
|
||||
remoteAddr key
|
||||
)
|
||||
|
||||
func CopyHeadersToContext(h http.HandlerFunc) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
func CopyHeadersToContext(h http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
ctx := context.WithValue(r.Context(), httpHeaders, r.Header)
|
||||
ctx = context.WithValue(ctx, remoteAddr, r.RemoteAddr)
|
||||
r = r.WithContext(ctx)
|
||||
h(w, r)
|
||||
}
|
||||
h.ServeHTTP(w, r)
|
||||
})
|
||||
}
|
||||
|
||||
func HeadersFromCtx(ctx context.Context) (http.Header, bool) {
|
||||
|
Reference in New Issue
Block a user