cors-anywhere/server.js
2023-05-04 04:00:45 -04:00

11 lines
364 B
JavaScript

const host = process.env.HOST || "0.0.0.0"; // The host to bind to
const port = process.env.PORT || 8080; // The port to bind to
require("cors-anywhere")
.createServer({
originWhitelist: [], // Allow all origins
requireHeader: ["origin", "x-requested-with"],
})
.listen(port, host, function () {
console.log(`CORS Proxy started on ${host}:${port}`);
});