# Nginx\_cross\_origin\_module - support cross origin resource sharing protocol in Nginx

**URL:** <https://www.ruby-forum.com/t/nginx-cross-origin-module-support-cross-origin-resource-sharing-protocol-in-nginx/214336>\
**Category:** NGINX\
**Created:** [November 29, 2011, 9:36am UTC](https://www.ruby-forum.com/t/nginx-cross-origin-module-support-cross-origin-resource-sharing-protocol-in-nginx/214336 "2011-11-29T09:36:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [November 29, 2011, 9:36am UTC](https://www.ruby-forum.com/t/nginx-cross-origin-module-support-cross-origin-resource-sharing-protocol-in-nginx/214336/1 "2011-11-29T09:36:28Z")

</div>

Hi, folks,

I’m pleased to release the nginx\_cross\_origin\_module.

This module can process the cross-origin resource sharing Javascript  
request with this protocol ([http://www.w3.org/TR/cors/](http://www.w3.org/TR/cors/)). This module  
follows the protocol version of 20100727.

The project site: [GitHub - yaoweibin/nginx\_cross\_origin\_module: add the support for cross-origin resource sharing protocol: http://www.w3.org/TR/cors/](https://github.com/yaoweibin/nginx_cross_origin_module)

Synopsis  
a simple example:  
http {

```
    cors on;
    cors_max_age 3600;
    cors_origin_list unbounded;
    cors_method_list GET HEAD PUT POST;
    cors_header_list unbounded;

    server {
        listen 80;
        server_name localhost;

        location / {
            root html;
            index index.html index.htm;
        }
    }
}

```
