File size: 565 Bytes
97b4c9b 3b40e72 56643f6 97b4c9b 77b902e 5c14de1 8db509b 9aff024 877c7dd 9aff024 97b4c9b 9aff024 97b4c9b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
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`);
});
|