Does it take time for the _headers or netlify.toml file to begin using the headers in those files? I see content updates immediately, but the changes in the _headers file is not immediate.
I deployed the same headers in the netlify.toml file, as weill. Other variables in the .toml file are seen by the site, so I know that it is deploying properly.
Okay! I may have solved this, and I will leave this here for anyone else struggling with this.
functions appear to have different headers than rest of the site! So, functions’ headers are affected by neither the _headers file nor the netlify.tomlheaders section.
The callback works much like the same parameter in an AWS Lambda function. Your handler should use the callback to return either an error (as the first parameter) or a response object, such as:
After 9 builds with increasing intensity to find where my headers were not going,
this is the answer.
Funny thing is that I was long using this in the callback, for critical headers; and yet
adding more later, got caught up in the toml and redirects doc. There ought to be
a cross-reference, or a link to both docs wherever you’re sent to find [one of the three sets of rules and ways] how to get your headers in.