marti Posted January 26, 2016 Report Share Posted January 26, 2016 (edited) I want to use the same async tag on multiple domains but get an error:"No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'xxxxx' is therefore not allowed access."How could I fix this?Tried to add this to asyncspc.php but did not help:header('Access-Control-Allow-Origin: *'); Edited January 31, 2016 by marti Quote Link to comment Share on other sites More sharing options...
marti Posted February 1, 2016 Author Report Share Posted February 1, 2016 In async.js at the position of withCredentials=true set to falseand put this in your httpd.conf:# Always set these headers.Header always set Access-Control-Allow-Origin "*"Header always set Access-Control-Allow-Methods "POST, GET, OPTIONS, DELETE, PUT"Header always set Access-Control-Max-Age "1000"Header always set Access-Control-Allow-Headers "x-requested-with, Content-Type, origin, authorization, accept, client-security-token" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.