-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.js
17 lines (16 loc) · 863 Bytes
/
server.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Listen on a specific host via the HOST environment variable
var host = process.env.HOST || '0.0.0.0';
// Listen on a specific port via the PORT environment variable
var port = process.env.PORT || 8080;
var cors_proxy = require('cors-anywhere');
cors_proxy.createServer({
originWhitelist: ['https://mlb.com','http://mlb.com','http://dofusports.xyz','http://roystream.com','http://volokit2.com','http://nodelaytv.pw','https://dofusports.xyz','https://roystream.com','https://volokit2.com','https://nodelaytv.pw'], // Allow all origins
//requireHeader: ['origin', 'x-requested-with'],
//removeHeaders: ['cookie', 'cookie2'],
//setHeaders:{'referer':'https://mlb.com','origin':'https://mlb.com'}
removeHeaders: [
'origin',
],
}).listen(port, host, function() {
console.log('Running CORS Anywhere on ' + host + ':' + port);
});