gapuchi
gapuchi
CDCloudflare Developers
Created by gapuchi on 8/16/2024 in #pages-help
Defining Multiple Content-Security-Policy-Report-Only in Headers
Hey all, I'm defining a _headers file for my Cloudflare page, but wanted to break up Content-Security-Policy-Report-Only over multiple lines since it is getting pretty long. I wanted to take advantage of https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy#multiple_content_security_policies and have something like
/*
Content-Security-Policy-Report-Only: default-src 'self'
Content-Security-Policy-Report-Only: worker-src 'self' blob:
/*
Content-Security-Policy-Report-Only: default-src 'self'
Content-Security-Policy-Report-Only: worker-src 'self' blob:
but Cloudflare automatically just appends the two with a , breaking the logic. Any way I can achieve this?
2 replies