I’m trying to add custom headers for a CSP to my site: elastic-babbage-dd5d05.netlify.app
I’ve also been trying deploying via the cli for the first time. I added some custom headers in both _headers and netlify.toml as I wasn’t seeing them in the response. On digging deeper, the headers are being read but only in the unique deploy url, not the aliased url.
For example, doing an alias deploy via:
netlify deploy --alias dev -m "Test cli nodir"
Gave the following output:
Logs: https://app.netlify.com/sites/elastic-babbage-dd5d05/deploys/60df696c37f112457c18ff85 Website Draft URL: https://dev--elastic-babbage-dd5d05.netlify.app
The issue is that the aliased url doesn’t include the headers while the deploy url does: see
https://60df696c37f112457c18ff85–elastic-babbage-dd5d05.netlify.app/ vs https://dev–elastic-babbage-dd5d05.netlify.app/
Further deploying to production with
netlify deploy -m "Test production deploy" --prod
Does apply the headers correctly. Any advice on why this may not be working?