249 questions
1
vote
1
answer
88
views
Issue capturing response in http-proxy-middleware
I am writing a proxy to relay websocket messages to a backend server.
Client initiates a request over HTTP to upgrade to WS using a Sec-WebSocket-Key header. The proxy has to intercept the request and ...
0
votes
0
answers
98
views
Header not set by http-proxy-middleware
I am trying to add a header to an HTTP request as:
const { createProxyMiddleware } = require('http-proxy-middleware');
const express = require('express');
const app = express();
const API_KEY = '...
0
votes
0
answers
205
views
Node.js http-proxy-middleware: Proxy request hangs with 408 timeout, onProxyReq not triggered
I'm building an API Gateway using Node.js, Express, and http-proxy-middleware. All incoming requests are forwarded to different services based on dynamic routing logic.
I'm encountering a 408 Request ...
0
votes
1
answer
84
views
How to continue in case of the router is not satisfied using http-proxy-middleware?
I have a node.js / express project and I try to implement http-proxy-middleware like this :
const app = express();
...
// 1st : `/mainUrls/*` are processed by the main app
app.use("/mainUrls"...
0
votes
1
answer
38
views
Flask-JWT-Extended: Ensure Refresh Cookie is Sent Only on `/refresh` but also on URLs with prefixes like `/api/refresh`
I am using Flask with the flask-jwt-extended library for authentication, and I have encountered an issue with the refresh cookie. My setup includes:
Backend: Flask running with flask run on port 5000....
1
vote
1
answer
569
views
Modifying response body from target proxy through http-proxy-middleware
I am trying to modify HTML body response of proxied target url, but my res.send method is not executing because onProxyRes function is not waiting the proxyRes.on('end', () => { event.
const ...
-1
votes
1
answer
239
views
Facing setupProxy issue in my react application
I'm facing an issue in my react application where I have created setupProxy.js file in that I have added multiple environment url (.development, .test) . Development port is running "http://...
-1
votes
1
answer
275
views
changes made to my JavaScript files in a React project are not reflected in the UI when compiling using 'npm start'. Reflecting only when rebuilt
Initial issue faced:
"Invalid options object. Dev Server has been initialized using an options object that does not match the API schema"
TO resolve this issue added setupProxy.js inside src ...
0
votes
0
answers
104
views
express http-proxy-middleware upload not working
When i am uploading file from frontend with formdata as body of post request, Backend is returning 400 bad request.
const formData = new FormData();
formData.append("file", this....
0
votes
1
answer
425
views
Using an async preHandler function on @fastify/http-proxy creates a FastifyError: Reply was already sent
I have the current code for proxying.
const fastify = require('fastify')({ logger: true })
const fastifyHttpProxy = require('@fastify/http-proxy')
fastify.register(fastifyHttpProxy, {
upstream: ...,...
0
votes
0
answers
466
views
How to modify http-proxy-middleware TLS fingerprint?
I use http-proxy-middleware to access various web-sites, including those having TLS fingerprint checks. My problem is that the proxy's TLS fingerprint is not corresponding to the User-Agent header I'm ...
2
votes
3
answers
1k
views
Invalid frame header error in websocket using by Webpack Hot Update after I use setupProxy for websocket
Below error message is shown on my console.
After researching, I found that this error message is thrown from the initSocket function, which should be used by webpack hot update.
Below is my ...
2
votes
1
answer
169
views
ExpressJS not redirecting configured PATH
I am setting up a local proxy to redirect specific URLs to another server, I am running my expressJS server as my main server, I have another server running on a different port... My express JS config ...
0
votes
2
answers
925
views
How to handle redirect from proxied server in webpack-dev-server proxy?
I'm having a webpack-dev-server enabled with watcher and reload on every change.
This frontend dev server is in docker container, and is proxying everything to another docker container, backend, which ...
0
votes
1
answer
90
views
Socket.io 4 with express.js - query parameters missing in onconnection
The query object from the client is simply missing from the handshake object on the server.
On console.log(socket) at the client, query object is shown in _opts while opts looks like -
hostname: "...