CORS Urgent Issue - Not Working

Created two subdomains -

sub1.domain.com
sub2.domain.com

Now, created a page rule that if sub1.domain.com/somefile.php is called, then permanent redirect it to sub2.domain.com/somefile.php

When sub1.domain.com/somefile.php is now called, browser throws error for CORS, that there is no cross origin request allowed for sub2.domain.com

Followed CF tutorial for configuring CORS using ACCESS policy.

But it still doesn’t work. Check this screenshot of configuration : https://content.screencast.com/users/IAmDeep/folders/Jing/media/dcecc6b4-561c-463f-af36-4fd157fea2bb/00001784.png

Any help?

Hi,

If not already done, check this article:

and try:
Update the resource’s last-modified time at your origin web server. Then, complete a full purge to retrieve the latest version of your assets including updated CORS headers.

Br,
Rui

Done this: Passing Access-Control-Allow-Origin headers from the origin server to the browser. By passing this from htaccess

Header set Access-Control-Allow-Origin "*"

Full Purged

Still doesn’t work and getting the same message

The problem here is that browsers, CORS and redirects do not mix. The only real solution is to not do a redirect. The MDN articles below give some more background.

This topic was automatically closed after 14 days. New replies are no longer allowed.