Unable to get headers to apply to subdirectory

For Workes & Pages, what is the name of the domain?

cluttr.ai

What is the error message?

Cross-Origin-Embedder-Policy: not set

What is the issue or error you’re encountering

I am setting the Cross-Origin-Embedder-Policy header in _headers, but it only works on the cluttr.pages.dev site, not cluttr.ai

What steps have you taken to resolve the issue?

Modified _headers file with wild card routing, and the Cross-Origin-Embedder-Policy header sent

Tried /*, /*assets/* assets/* *.js

/*
Referrer-Policy: strict-origin
Cross-Origin-Embedder-Policy: require-corp
Cross-Origin-Opener-Policy: same-origin
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST

the annoying part is, it appears to work fine from the test domain (cluttr.pages.dev) but not my actual domain
when I apply more specific rules it actually breaks the cluttr.pages.dev site

What are the steps to reproduce the issue?

Create a app with a root index.html, that loads a JS file, that then itself lazy loads another JS file.

Then create a _headers file with the rules above and observe the request to the assets directory will not have the headers applied

Screenshot of the error

I figured out the issue. It was simply caching… Make sure dev mode is on

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.