Site name: predrag.netlify.app
Deploys as: https://predr.ag/
Domain alias: https://play.predr.ag/
I’m trying to set custom headers on the responses sent from https://play.predr.ag/
[[headers]]
for = "https://play.predr.ag/*"
[headers.values]
Cross-Origin-Opener-Policy = "same-origin"
Cross-Origin-Embedder-Policy = "require-corp"
The resources at play.predr.ag are served via a 200 redirect elsewhere on the main predr.ag domain:
[[redirects]]
from = "https://play.predr.ag/*"
to = "https://predr.ag/demo/playground/:splat"
status = 200
Right now:
- the deploy succeeds
- the resources are found and served
- however, the responses are lacking the headers I need — so the page ends up not working correctly
I expected either:
- a deploy error causing a failed deploy, because I’m attempting to do something that isn’t supported, or
- all this to work properly: my play.predr.ag resources to be delivered with the custom headers I specified.
Things I’ve tried:
- I’ve added a
[[headers]]
block with the custom headers for the redirect destinationhttps://predr.ag/demo/playground/*
. This didn’t have any noticeable effect – the headers were still not present. - Reading the docs on headers, redirects, and domain aliases. The headers page doesn’t mention anything about subdomains or domain aliases, and the redirects and domain aliases pages don’t mention anything about headers.
So far I’ve really been enjoying using Netlify for my side projects! This is the first time I’ve found myself really blocked, and I hope someone more experienced with Netlify might be able to help. Thanks!