Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get Access-Control-Allow-Origin to work?

how do I get Access-Control-Allow-Origin to work?

Access-Control-Allow-Origin: *

My questions:

  • How do I get Access-Control-Allow-Origin to work?
  • Is Access-Control-Allow-Origin supported by all major browsers?

Thank you.

like image 496
Ryan Zygg Avatar asked Nov 24 '10 22:11

Ryan Zygg


1 Answers

Check out Nicholos C. Zakas intro.

There is a lot of solid support for cross-domain Ajax in modern web browsers, yet most developers are still unaware of this powerful capability. Usage requires just a little bit of extra JavaScript work and a little extra server-side work to ensure that the correct headers are being sent. IE8’s implementation lags a bit behind the others in terms of allowing advanced requests and credentialed requests, but hopefully support for CORS will continue to improve.

like image 144
Sean Hogan Avatar answered Oct 08 '22 10:10

Sean Hogan