README
Usage
Quick Start
By default, the middleware will use a (*
) wildcard for the domain value.
var crossDomainXML = require('crossdomain-xml');
app.use(crossDomainXML);
will output:
<cross-domain-policy>
<allow-http-request-headers-from domain="*" headers="*"/>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*"/>
</cross-domain-policy>
Use a specific domain
Or, pass a domain to the middleware function to use as the domain value.
var crossDomainXML = require('crossdomain-xml');
app.use(crossDomainXML('*.example.org'));
which will output:
<cross-domain-policy>
<allow-http-request-headers-from domain="*.example.org" headers="*"/>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*.example.org"/>
</cross-domain-policy>