268 questions
0
votes
0
answers
50
views
Encountering Error: self-signed certificate in certificate chain
I encountered this error while trying to set up proxy Error: self-signed certificate in certificate chain. Does anyone know why this happened? I have downloaded the SSL certificate from the proxy ...
1
vote
1
answer
685
views
Nodejs Http Proxy Server Gives Socket Hang up Error
I have created a containerized proxy server (say worker server) that listens on port 5000. I ran the container with --network=host option so that it may access the ports on host machine without ...
1
vote
1
answer
2k
views
Proxy EventSource (SSE) connections through NodeJS to a localhost backend
I have an issue with EventSource connections through node-http-proxy v1.18.1. The connections work in development, from create-react-app, proxy: , but when deploying to production, the connection ...
3
votes
1
answer
1k
views
Proxying Websocket requests from https to http in Node.js
I am working on a Node.js proxy server that routes requests from a website to a localhost endpoint. The website can run either locally or on a cloud instance, so the proxy needs to support both HTTP ...
0
votes
1
answer
343
views
Adding a proxy using http-proxy in front of theia editor
I am running theia editor on port 6080 (say), when I am opening editor at -> localhost:6080 it works perfectly
I am Running a proxy server as below, which is proxying the request from 5000 port to ...
0
votes
1
answer
520
views
http-proxy module doesn't work with create-react-app, but works with serve -s build
http-proxy module doesn't work with create-react-app, but works with serve -s build
This is my proxy-server code.
So what it does - it joins 2 api servers on different ports and frontend to a single ...
3
votes
0
answers
509
views
Catch all requests and proxy a subset to a different server
I would like to proxy all requests matching a certain criteria to my backend server. Is there any way to catch all requests and let a subset through the proxy based on things like headers and request ...
1
vote
0
answers
605
views
Can't upgrade to websockets using https via http-proxy in Nodejs
I am using http-proxy to proxy my requests. I am using https not http. The first request is a login request and works fine. The second request is to connect to socket.io which doesn't works even doesn'...
0
votes
1
answer
914
views
Is there a way to get Vite.js to use axios.options?
I am in the process of moving everything from Vue CLI to Vite.
Right now, I have everything that was in vue.config.js to be in vite.config.ts of the new project. Every axios call that was proxy works ...
1
vote
0
answers
573
views
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 ...
9
votes
4
answers
14k
views
Vite react proxy sends requests to different endpoints depending on current location
After switch to vite, I am trying to mimic proxy: "http://localhost:5000" which I previously used in package.json
Here is my vite config
export default defineConfig({
plugins: [react()],
...
0
votes
1
answer
2k
views
http-proxy-middleware adds a '/' before query parameters
I want to consume an API using a proxy written in express. I use http-proxy-middleware for this. Here is the setup I have:
app.use(
createProxyMiddleware('/api', {
target: 'http://example.com/...
0
votes
1
answer
796
views
fastify-formbody and fastify-http-proxy are changing application/x-www-form-urlencoded request to string
I am using fastify to proxy calls to spring boot backend. Using fastify-http-proxy as proxy and application/x-www-form-urlencoded content type. To support it I am using fastify-formbody.
If I do ...
1
vote
2
answers
2k
views
How to use http-proxy-middleware / node-http-proxy as a reverse proxy?
I'm investigating the use of http-proxy-middleware / node-http-proxy as a reverse proxy. Does anyone know if this is really possible?
I've already setup http-proxy-middleware so that I can proxy a ...
2
votes
0
answers
928
views
How to use two chained socks proxies for a request in nodejs
I am trying to achieve an experimental setup in nodejs as illustrated below:
https-server --> local socks5 proxy (Tor) --> my external socks5 proxy --> webserver.
The existing https-server ...
0
votes
1
answer
1k
views
Node Fetch resolve host like curl request
can we replicate curl resolve host in node-fetch or any other node http library.
curl https://www.example.net --resolve www.example.net:443:127.0.0.1
1
vote
0
answers
2k
views
URL as query param in proxy, how to navigate?
I'm using http-proxy to create a simple proxy: localhost:3000?q=${encodeURIComponent(targetURL)} will access targetURL using the proxy.
Here's my working code:
var http = require("http");
...
1
vote
0
answers
1k
views
Response from http-proxy-middleware is not showing up properly [MIME-type] error
I am working to host multiple (nodejs + react) applications at different ports. As proof of concept I want http://localhost:3000/project1 to load an application running on http://localhost:4000. I ...
1
vote
0
answers
691
views
My Node.js HTTP proxy server crash on connResetException
I have implemented a HTTP-proxy server app in Node.js, using the http-proxy module.
Occasionally the App crashes and according to the logfile it seems like it is caused by a connection reset exception,...
3
votes
0
answers
1k
views
Convert express Response to http ServerResponse
I am using both express and http-proxy. After updating NodeJs types I am getting a type error:
TS2345: Argument of type 'Response<any, Record<string, any>>' is not assignable to parameter ...
2
votes
0
answers
546
views
Proxy https to http (example) not working - node-http-proxy
I have a HTTP web server and I'm trying to set it up behind a HTTPS proxy server.
I've tried the example that's in the repository: https://github.com/http-party/node-http-proxy/blob/master/examples/...
0
votes
0
answers
516
views
node-http-proxy modifying outbound request URL
I am setting up a reverse proxy server with node-http-proxy and wanted to know how to pass in a variable to change the outbound request on a per-request basis. I want to make all my calls to the proxy ...
2
votes
1
answer
4k
views
http-proxy-middleware change headers asynchronously
I'm using http-proxy-middleware in NodeJS to proxy a PHP site that does authentication.
The PHP site returns a header "saml-user-id".
I use this saml-user-id to generate a token which I want ...
1
vote
0
answers
1k
views
Nodejs HTTPS->HTTPS proxy
I'm trying to setup an HTTPS server that proxies requests to changing targets that also enforce HTTPS. this is because I want to setup an intercepting https proxy, terminate ssl, modify data and send ...
1
vote
1
answer
2k
views
How to set Access-Control-Allow-Headers header in node-http-proxy
I am using the coinbase-pro library to make post request to the coinbase sandbox api through a form on localhost. I am trying to use node-http-proxy to get around a CORS error with no success. Ive ...
0
votes
0
answers
549
views
Create a HTTPS Proxy for arbitrary external urls
I want to create a simple proxy for requests to arbitrary websites with Node.js (http-node-proxy) (and TypeScript for my case). I know that several questions exist on this difficult topic, but none of ...
1
vote
1
answer
843
views
Single port route to different services
My question is: is http-proxy, reverse-proxy.js, or any other library(with exception of a web-server like nginx) capable of routing all requests that comes to the port 80 to another services based on ...
1
vote
1
answer
2k
views
How to make a bocking Request in NodeJS inside a http-proxy-middleware function?
I have a proxy server which modifies a specific type of POST Request before forwarding it to the Server.
The Modification requires me to make a request to another server in order to get the new value ...
0
votes
1
answer
2k
views
issue with nestjs + fastify-http-proxy
I am trying to build a Nestjs api proxy (pass through). I found this package which is very simple to use: fastify-http-proxy.
The problem is I don't know how to use this package within Nestjs.
Does ...
1
vote
0
answers
533
views
Modify server response using node http proxy
I am a beginner to node js and this is my first post in here so apologies if this is a stupid question.
The problem I need to solve is to change information in an HTTPS server response before it hits ...
2
votes
0
answers
1k
views
Https proxy server(secure proxy server) in Nodejs with http-proxy is not working
I have a requirement to set up an https proxy server(Secure Web Proxy-http://dev.chromium.org/developers/design-documents/secure-web-proxy) to test one of my application with the proxy environment.
...
2
votes
0
answers
1k
views
DNS resolve timeout/delay for domains mapped to localhost in hosts file
I'm actually facing an issue which came up when using the proxy in Angular CLI.
But it's not related directly to Angular nor to node.js... it seems to have it's roots some levels deeper (namely on ...
0
votes
1
answer
990
views
nodejs http-proxy not passing URL
I'm using http-proxy module and I'm trying to send the request to port 1234 and gets its reply back.
But in the apache logs I can see that request is only to /. The documentation says to use toProxy: ...
1
vote
0
answers
558
views
PUT method not allowed with http-proxy
When calling my PUT method, I got this error:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>403 Forbidden</title>
</head>
...
1
vote
0
answers
932
views
Target server not recieving the request body in http-proxy?
I am trying to introduce gateway for my micro services. I got stuck in post method. Target server not receiving the request body. Not sure what i am doing wrong. Can any one help me out. Here is the ...
7
votes
2
answers
3k
views
Node JS HTTP Proxy hanging up
I have an http-proxy to proxy any website and inject some custom JS file before to serve the HTML back to the client. Whenever I try to access the proxied website, it will hang up or the browser seems ...
0
votes
0
answers
1k
views
Http proxy with https target
I'm trying to create my own proxy server in NodeJs with the library node-http-proxy the problem is that I want to create a http proxy server that will have the possibility to forward the request to a ...
0
votes
1
answer
201
views
node-http-server module to respond with index.html to any request
I have installed a node-http-server module. I launch it from myDir on localhost port 8000. In myDir I have index.html.
If I request (from the browser) http://localhost:8000/ I get index.html, which is ...
0
votes
1
answer
1k
views
Webpack-dev-server handle proxy header
I have an issue with webpack-dev-server when it proxys to my prod env. The production server sends me 'set-cookie' header but it is an array and I don't see it in dev-server's response in the browser. ...
0
votes
1
answer
3k
views
http-proxy to cloudfront results in 403 error
I have a series of serverless next.js apps running on AWS that I am serving at subdomains, and I want to proxy them to subdirectories on my main domain. So, for example, the app at foo.example.com/foo/...
1
vote
1
answer
206
views
How to make pouchdb cloudant replication work with node.js/express proxy?
I'm unable to get PouchDB Cloudant replication to work over a proxy (express/node.js server and node-http-proxy). Would like to achieve this to add access control.
Replication works without proxy:
...
0
votes
1
answer
618
views
hanging POST requests in Nodejs
I'm using expressjs to create and API.
I also have a proxy server to direct requests to my API Server, as follows:
But on the API server the body of POST and PUT requests are unable to parse and the ...
0
votes
2
answers
539
views
how to use node-http-proxy inside AdonisJS controller
I am trying to use node-http-proxy inside an AdonisJS controller, but I get the error
The "url" argument must be of type string. Received type function
The line causing the error is the proxy.web(...
9
votes
1
answer
2k
views
Why is Chrome waiting before every second request when using webpack-dev-server?
Can someone help me understand what is happening in the hundreds of milliseconds before the initial connection?
It happens on every other request only as shown.
The requests are POSTs made to the ...
3
votes
1
answer
4k
views
How can I pass a proxied response when 'selfHandleResponse' is true?
I am running a development proxy-server where on startup I make a request for an auth token with our cluster architecture.
However, this token expires after some time. Then instead of the developer ...
1
vote
1
answer
473
views
ArangoDB Web Interface Behind Node.js Reverse Proxy - Cannot Connect
I have a Node.js back end that I am using for authentication and for reverse proxy of an ArangoDB Web Interface. I cannot for the life of me figure out why I am unable to log into the Web Interface ...
0
votes
1
answer
1k
views
Proxy target route to invalid url
I am trying to get http-proxy-middleware working, what I am trying to achieve is having multiple nodejs apps running and then having the proxy app as a reverse proxy server.
The problem I encounter ...
3
votes
0
answers
734
views
How to handle connect method in node's http-proxy to allow websocket connection through the proxy?
I'm trying to make an HTTP proxy server using node-http-proxy module but I also want to support WebSocket in my proxy server. For that, I have registered an event listener on the upgrade method like ...
3
votes
1
answer
4k
views
node-http-proxy, how to pass new query parameters to initial request?
I am trying to add new query params to the original request in my node-http-proxy, tweaking the req.query directly like this doesn't work:
app.all(path, function (req, res) {
req.query.limit = 2;
...
0
votes
1
answer
532
views
encodeURIComponent on dynamic request url, node.js
I am requesting an index.djvu that fires requests for documents by id. The requests id that the index.djvu fires is Base64 encoded e.g document/page_1_1_1_k21g_MjE4MGstMTAvMTE=.djvu where the id is ...