Permissive CORS
Allows CORS for Node HTTP in the most permissive way.
Any specific headers or HTTP verbs requested by client calls via Access-Control-Request-Method or Access-Control-Request-Headers will be automatically added to the corresponding response headers. In other words, this middleware ALLOWS ALL THE THINGS.
Installation
npm install permissive-cors
Example
Example using Express:
var express = ;var app = ; var cors = ;app; app;app;
Example using Node HTTP:
var http = ;var cors = ;var corsMiddleware = ; http;
Tests
Run npm test
Compatibility
Tested in Chrome 36, Safari 7 and Firefox 30. For any bugs found, feel free to submit a PR.