1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 07:49:41 +02:00

feat(csp): enable CSP by default BE-11961 (#872)

This commit is contained in:
andres-portainer 2025-07-09 16:15:43 -03:00 committed by GitHub
parent 4d11aa8655
commit ea4b334c7e
8 changed files with 56 additions and 5 deletions

View file

@ -60,6 +60,8 @@ func (testRequestBouncer) JWTAuthLookup(r *http.Request) (*portainer.TokenData,
func (testRequestBouncer) RevokeJWT(jti string) {}
func (testRequestBouncer) DisableCSP() {}
// AddTestSecurityCookie adds a security cookie to the request
func AddTestSecurityCookie(r *http.Request, jwt string) {
r.AddCookie(&http.Cookie{