Skip to content

Instantly share code, notes, and snippets.

@giabao
Forked from rbranson/crossdomain.conf
Created May 7, 2014 04:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save giabao/3409314b8e2161d29ee8 to your computer and use it in GitHub Desktop.
Save giabao/3409314b8e2161d29ee8 to your computer and use it in GitHub Desktop.
# Add this to your nginx.conf under http { }
server {
listen 843;
server_name localhost;
location / {
rewrite ^(.*)$ /crossdomain.xml;
}
error_page 400 /crossdomain.xml;
location = /crossdomain.xml {
root /var/www/crossdomain;
}
}
# In /var/www/crossdomain, create a crossdomain.xml file:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" secure="false" to-ports="*"/>
<site-control permitted-cross-domain-policies="master-only" />
</cross-domain-policy>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment