Skip to content

Instantly share code, notes, and snippets.

@cyio
Created October 14, 2019 14:48
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 cyio/31f4aaa3d3fa430bf77e812cf38797a8 to your computer and use it in GitHub Desktop.
Save cyio/31f4aaa3d3fa430bf77e812cf38797a8 to your computer and use it in GitHub Desktop.
cors
diff --git a/package.json b/package.json
index 4e034db..94609b4 100644
--- a/package.json
+++ b/package.json
@@ -41,6 +41,7 @@
"supertest": "^2.0.1"
},
"scripts": {
+ "start": "PORT=8099 node server",
"lint": "eslint .",
"test": "mocha ./test/test*.js --reporter spec",
"test-coverage": "istanbul cover ./node_modules/.bin/_mocha -- test/test.js test/test-ratelimit.js --reporter spec"
diff --git a/server.js b/server.js
index fb3f84d..f2d5f28 100644
--- a/server.js
+++ b/server.js
@@ -23,7 +23,7 @@ var cors_proxy = require('./lib/cors-anywhere');
cors_proxy.createServer({
originBlacklist: originBlacklist,
originWhitelist: originWhitelist,
- requireHeader: ['origin', 'x-requested-with'],
+ // requireHeader: ['origin', 'x-requested-with'],
checkRateLimit: checkRateLimit,
removeHeaders: [
'cookie',
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment