fix(csrf): disable csrf secure cookie EE-6787 (#11300)

This commit is contained in:
cmeng
2024-03-13 11:22:11 +13:00
committed by GitHub
parent 506ee389e3
commit a2a4c85f2d

View File

@@ -21,7 +21,11 @@ func WithProtect(handler http.Handler) (http.Handler, error) {
return nil, fmt.Errorf("failed to generate CSRF token: %w", err)
}
handler = gorillacsrf.Protect([]byte(token), gorillacsrf.Path("/"))(handler)
handler = gorillacsrf.Protect(
[]byte(token),
gorillacsrf.Path("/"),
gorillacsrf.Secure(false),
)(handler)
return withSkipCSRF(handler), nil
}