Skip to content

Instantly share code, notes, and snippets.

@rbranson
Created February 3, 2011 21:13
Show Gist options
  • Select an option

  • Save rbranson/810211 to your computer and use it in GitHub Desktop.

Select an option

Save rbranson/810211 to your computer and use it in GitHub Desktop.

Revisions

  1. rbranson created this gist Feb 3, 2011.
    27 changes: 27 additions & 0 deletions crossdomain.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    # 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>