CSP et al headers from origin are only applied when cf-cache-status is BYPASS
What steps have you taken to resolve the issue?
I have reviewed that the rules exist and are configured properly in NGINX, and function when I allow direct origin access through Cloudflare.
What are the steps to reproduce the issue?
Load the homepage and load the response headers.
Go to a page that has music playing, and look at the response for the opus file. The proper headers from the server are all there but the cf-cache-status is BYPASS
Interesting, it was working prior to moving my DNS to cloudflare. Here is an example of a file that is getting BYPASS and has the headers configured on the server.
Ok, I do see that CSP, though it’s usually not necessary since the .opus file probably isn’t going to trigger any other loads that CSP needs to manage.
You’ll still need to fix the server so it returns CSP for the home page, and other HTML.
Otherwise, nothing has changed and there is no rules that exclude headers from any requests. They are defined within the top level server block with no surrounding logic.
Solved it, I had included an external configuration to add cache control headers to certain directory structures, not realizing that an add_header in a location block removed all other headers defined in the parent server.