0

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.

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
user1506119
  • 156
  • 1
  • 1
  • 7
  • 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 Answers1

1

On apache :

Access-Control-Allow-Origin: *

Or on php :

Check here : Origin is not allowed by Access-Control-Allow-Origin

Community
  • 1
  • 1
pablofr
  • 134
  • 1
  • 14