CORS Error on static cached files

The cached static files like css and js are being blocked with CORS error, while indexation.

The Origin request header is part of the default Cloudflare cache key, so necessary CORS headers can be added on your Origin server, and they will be cached independently for each value to the Origin request header.

You can also use a Transform Rule to add any needed CORS headers.

A common problem that appears in DevTools as a CORS issue is where the status code is not accepted, such as when you get an access denied or 404 error.

If you want to share a URL that demonstrated the error it can help in diagnosing and resolving issues.

1 Like