🏳️enable cross-origin resource sharing

Website faviconenable-cors.org

CORS support site

[Enable CORS](index.html)

*   [Home](index.html)

*   [Server](server.html "I want to add CORS support to my server")

*   [Client](client.html "I want to use CORS from JavaScript")

*   [Resources](resources.html "More resources")

*   [Suggest!](https://github.com/mhausenblas/enable-cors.org/issues)

*   [Help!](https://stackoverflow.com/questions/tagged/cors)

enable cross-origin resource sharing

====================================

Cross-Origin Resource Sharing (CORS) is a [specification](http://www.w3.org/TR/cors/) that enables truly open access across domain-boundaries. If you serve public content, please consider using CORS to open it up for universal JavaScript/browser access.

\[[more...](https://en.wikipedia.org/wiki/Cross-Origin_Resource_Sharing)\]

Why is CORS important?

----------------------

JavaScript and the web programming has grown by leaps and bounds over the years, but the [same-origin policy](https://en.wikipedia.org/wiki/Same_origin_policy) still remains. This prevents JavaScript from making requests across domain boundaries, and has spawned various hacks for making cross-domain requests.

CORS introduces a standard mechanism that can be used by all browsers for implementing cross-domain requests. The spec defines a set of headers that allow the browser and server to communicate about which requests are (and are not) allowed. CORS continues the spirit of the open web by bringing API access to all.

[

### CORS on the server

](server.html)

[

### CORS on the client

](client.html)

[

### More resources

](resources.html)

Who’s behind this

-----------------

[Monsur Hossain](http://monsur.hossa.in) and [Michael Hausenblas](http://mhausenblas.info/)

Contribute

----------

The content on this site stays fresh thanks to help from users like you! If you have suggestions or would like to contribute, [fork us on GitHub](https://github.com/mhausenblas/enable-cors.org).

Buy the book

------------

[](http://manning.com/hossain)Save 39% on CORS in Action with promotional code **hossainco** at [manning.com/hossain](http://manning.com/hossain)