Questions tagged [express-http-proxy]
9 questions
1
vote
0 answers
express-http-proxy is not passing req.user in proxied service nodejs
In nodejs created a gateway that proxies the apis based on some conditions. The gateway also checks the headers in token and if validated then set the req.user
Here is the proxy code
proxy(host) {
// call proxy middleware with request option…

Sunil Garg
- 14,608
- 25
- 132
- 189
1
vote
0 answers
nmap to scan a list of endpoints (ip:port)
Is there a way to scan a big list of specific endpoints (IP:port) in nmap without passing them individually? We have a list of IP:port that we want to run through the http-open-proxy script to verify which one are really open proxies to set up…

Sayantan Ghosh
- 998
- 2
- 9
- 29
1
vote
0 answers
Parse request body and determine proxy target NodeJS http-proxy
Due to a use case, I am trying to first parse request body and then decide the proxy target. But whenever I am parsing req body, proxy does not work. it just becomes unresponsive. I tried bodyparser and reading from buffer as well, but any try to do…

Sam
- 13
- 4
1
vote
0 answers
Unit test express-http-proxy with Jest
I have a custom-proxy.ts module that exports a function like this:
import proxy from 'express-http-proxy';
export const customProxy = proxy('a-url', {
filter: 'POST',
https: true
}
This is registered with an express route as…

q-q
- 13
- 2
1
vote
1 answer
How to log success and error message of express-http-proxy
i want to console log success and error response of this proxy request, however i'm not able to find any option to do that:
app.get(
"/api/:resource/:id",
requestProxy({
cache: redis.createClient(),
cacheMaxAge: 60,
url:…

Rukmani Tripathi
- 11
- 3
0
votes
1 answer
express-http-proxy - handle form-data and body request nodejs
I have created a nodejs gateway server, in which based on url prefix, it proxy using express-http-proxy:1.5.1 to many other microservices like this
this.router.all(Routes.ABC, httpProxy(baseUrl.XYZ, {
parseReqBody: false,
}));
now one of my…

Sunil Garg
- 14,608
- 25
- 132
- 189
0
votes
0 answers
How to host a React app from one Node server to another based on routing?
I have two different React applications running through independent node servers.
For instance, let's say I have two servers: http://localhost:4000, and http://localhost:5000.
Both are running Node servers, which internally expose React…

Jay Shukla
- 11
- 1
- 3
0
votes
0 answers
How to proxy an iframe from an external domain using express-http-proxy
I am trying to display an iframe for an external website (e.g. zillow.com) in my React website and given that I cannot access or alter the contents of an iframe for external domains, I was reading that I need to proxy the website into mine in order…

noblerare
- 10,277
- 23
- 78
- 140
0
votes
1 answer
Why does express-http-proxy seem to be ignoring the path?
I have the following...
const coreUrl = "myip:3000"
app.use('/login', proxy(coreUrl, options));
I would expect this to forward to myip:3000/login but it actually forwards to myip:3000 I also tried using coreUrl+"/login" as well but that didn't seem…

Jackie
- 21,969
- 32
- 147
- 289