Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

crossdomain

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crossdomain

Render a `crossdomain.xml` so that Adobe Flash Player clients can make requests to your domain. More on this nonsense [here](http://www.adobe.com/devnet/adobe-media-server/articles/cross-domain-xml-for-streaming.html).

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

crossdomain

Render a crossdomain.xml so that Adobe Flash Player clients can make requests to your domain. More on this nonsense here.

Installation

$ npm install crossdomain

Example

var crossdomain = require('crossdomain');

crossdomain({ domain: '*.segment.io' });

which returns:

<cross-domain-policy>
  <allow-http-request-headers-from domain="*.segment.io" headers="*"/>
  <site-control permitted-cross-domain-policies="all"/>
  <allow-access-from domain="*" secure="false"/>
</cross-domain-policy>

and Express integration works like this:

var app = express();
var xml = crossdomain({ domain: '*.segment.io' });

app.all('/crossdomain.xml', function (req, res, next) {
  res.set('Content-Type', 'application/xml; charset=utf-8');
  res.send(xml, 200);
});

app.listen(8000);

API

.crossdomain(options)

Generate a crossdomain.xml file with custom options. options.domain is mandatory, and everything else is defaulted to this:

{
    "allow-http-request-headers-from-headers": "*",
    "site-control-permitted-cross-domain-policies": "all",
    "allow-access-from-domain": "*",
    "allow-access-from-secure": "false"
}

Read more about these options in the Adobe docs.

License

WWWWWW||WWWWWW
 W W W||W W W
      ||
    ( OO )__________
     /  |           \
    /o o|    MIT     \
    \___/||_||__||_|| *
         || ||  || ||
        _||_|| _||_||
       (__|__|(__|__|

FAQs

Package last updated on 30 Oct 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc