Spaces:
Building
Building
File size: 466 Bytes
97b4c9b 3f62408 56643f6 97b4c9b 8db509b 9aff024 196b3e4 233855e 9aff024 97b4c9b 9aff024 3f62408 97b4c9b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
const express = require('express');
const proxy = require('express-http-proxy');
const app = express();
const targetUrl = 'https://api.wolframalpha.com';
const port = 7860;
app.use('/', proxy(targetUrl, {
https: true,
proxyReqOptDecorator: (proxyReqOpts, srcReq) => {
// console.log(srcReq, proxyReqOpts);
proxyReqOpts.headers['x-forwarded-for'] = '98.102.88.158';
return proxyReqOpts;
},
}));
app.listen(port, () => {
console.log(`WARP`);
});
|