Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Why CORS policy is not working in any browser when its header exist in response?
Header set Access-Control-Allow-Origin "*" in apache
httpd.conf but still i get CORS policy error in console.
<IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule>
Redirect from ... to ... has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin ... is therefore not allowed access.
And You can see the response headers in this image.
My website is a multisite Wordpress. I’ve tested different plugins for this purpose and also .htaccess. Everything including ajax requests from subdomains and vice versa were fine but suddenly this error happened without touching a single code on the server. Is there any solution for this error?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×