I was thinking that some people want to run their own cors proxy servers for privacy reasons, so it might be easier for them if this proj includes one, and has an npm script to start it?
Then they could just do:
Something like
/*
* from https://www.npmjs.com/package/cors-anywhere#example
*/
// Listen on a specific host via the HOST environment variable
const host = process.env.HOST || "0.0.0.0";
// Listen on a specific port via the PORT environment variable
const port = process.env.PORT || 8080;
const cors_proxy = require("cors-anywhere");
cors_proxy
.createServer({
originWhitelist: [], // Allow all origins
requireHeader: ["origin", "x-requested-with"],
removeHeaders: ["cookie", "cookie2"],
})
.listen(port, host, function () {
console.log("Running CORS Anywhere on " + host + ":" + port);
});
I can make a PR if this is something you feel is beneficial!
I was thinking that some people want to run their own cors proxy servers for privacy reasons, so it might be easier for them if this proj includes one, and has an npm script to start it?
Then they could just do:
Something like
I can make a PR if this is something you feel is beneficial!