warp / server.js
xovakat's picture
Update server.js
877c7dd verified
raw
history blame
565 Bytes
const express = require('express');
const proxy = require('express-http-proxy');
const app = express();
const targetUrl = 'https://api.wolframalpha.com';
const port = 7860;
// app.use(express.json({ limit: '10mb' }));
// app.use(express.urlencoded({ limit: '10mb', extended: true }));
app.use('/', proxy(targetUrl, {
https: true,
proxyReqOptDecorator: (proxyReqOpts, srcReq) => {
// console.log(srcReq);
proxyReqOpts.headers['x-forwarded-for'] = '104.10.196.121';
return proxyReqOpts;
},
}));
app.listen(port, () => {
console.log(`GRP`);
});