Unable to modify or remove _headers processing

I’ve been using a _headers file to set custom headers for some time; specifically, a Content Security Policy.

The _headers file is in the correct public/ “Publish Directory” but when I make changes, they are not reflected on the deployed site. I still see the previous settings from before my modifications.

To go further, I’ve completely removed the _headers file from my repository and committed the changes. My site is deploying from the correct branch of my repository, yet the deploy log still shows 1 header rule processed.

My repository does not contain a netlify.toml configuration file, so that is not the source of the header configuration.

I’ve done a “clear cache and deploy site” as well, yet the headers are still configured.

How do I completely unset header configurations?

Follow-up:

I was able to resolve this by temporarily clearing the repository and removing the build command in the deploy settings. I then did a “clear cache and deploy” to deploy an empty site, then restored the contents of my repository, added the build command back, and redeployed. This kicked whatever was ‘cached’ out, and everything began working again.

/thread

1 Like

thank you for posting your solution!