Is it possible to make a jQuery request to get a webpage if this request originates from localhost? I am currently using wamp server and get the message XMLHttpRequest cannot load <url>. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.
Asked
Active
Viewed 30 times
0
-
if you control the endpoint you can implement CORS on endpoint, otherwise use a script on your localhost as proxy to get the data using cURL – charlietfl Feb 07 '16 at 20:05
1 Answers
1
On apache :
Access-Control-Allow-Origin: *
Or on php :
Check here : Origin is not allowed by Access-Control-Allow-Origin