Node.js proxying made simple. Configure proxy middleware with ease for connect, express, browser-sync and many more. Powered by the popular Nodejitsu http-proxy.
Questions tagged [http-proxy-middleware]
241 questions
0
votes
1 answer
POST http://localhost:3000/api/sendMail 404 (Not Found)
I am using http-proxy-middleware to send my form data from React front end to Express server,
but http-proxy-middleware doesn't seem to work.
It should proxy to localhost://5000.
Instead throws an error:
POST http://localhost:3000/api/sendMail…

Kartik Gupta
- 35
- 5
0
votes
1 answer
How do I proxy _some_ requests to '/' using http-proxy-middleware for Webpack?
I'm trying to solve a unique problem w/ an app where I need to use webpack dev-server's proxy functionality to proxy specific requests through to a backend service.
The problem I'm having is figuring out how to handle an odd use case.
I have Webpack…

RavenHursT
- 2,336
- 1
- 25
- 46
0
votes
1 answer
gae nodejs proxy to IIS ASP api producing invalid json response
I have an angular application running on Google Cloud AppEngine on nodejs12 runtime.
When I proxy an api request from express server in Google cloud environment to an ASP application running on IIS, I recieve very strange response
Requests are…

isawk
- 969
- 8
- 21
0
votes
0 answers
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.
Also, when I debug I see a lot of headers…

aspirisen
- 965
- 13
- 29
0
votes
1 answer
How to proxy my API URL to some other proxy
I am on http://localhost:8081/post URL and my API is hosted at some "http://dummy.restapiexample.com/api/v1".
I want it to appear in the network tab like "/custom/create". But the network tab is showing "http://localhost:8081/custom/create" but it…

shubham saurabh
- 31
- 7
0
votes
1 answer
Webpack proxy w/ Wordpress not redirecting GET requests inside page
I'm trying to create a Wordpress theme development environment (more precisely migrating from gulp w/ browser-sync to webpack). Therefore I've set up a proxy pointing to my wordpress installation (also locally). When I access the webpack dev server…

josias
- 1,326
- 1
- 12
- 39
0
votes
1 answer
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 is when I press a link on a proxied app, here's my…

NicolajLJ
- 23
- 4
0
votes
2 answers
Specifying proxy for http-proxy-middleware
I have a nodeJS project for a front-end that connects to multiple micro services.When we do final deployments we actually deploy the built JS and HTML in a WAR file along with the backend.
However, for development we use the http-proxy-middleware so…

Menelaos
- 23,508
- 18
- 90
- 155
0
votes
0 answers
webpack reference erro window.location.hostname cannot be found, vue.js
Any help would be really appreciated on this issue.
I want to set the proxy target dynamically inside webpack index.js
proxyTable: {
'/api': {
target: 'http://' + window.location.hostname.split('.')[0] + '.example.com',
changeOrigin:…

Muhammad Shahzad
- 75
- 9
0
votes
1 answer
how to setup proxy table in create-react-app
I have an API backend server, the frontend is being served by a different server created by create-react-app and I need to proxy a specific set of requests from CRA server to the API server.
I am trying to make use of http-proxy-middleware. For a…

Matus Dubrava
- 13,637
- 2
- 38
- 54
0
votes
1 answer
Scrapy is throwing TWISTED Unhandled error in Deferred when the spider is using proxymiddleware
I am using ProxyMiddleware in scrapy , and its throwing non traceable error.
Here is Traceback :
Unhandled error in Deferred:
[twisted] CRITICAL: Unhandled error in Deferred:
[twisted] CRITICAL:
Traceback (most recent call last):
File…

Vikram Nimbalkar
- 11
- 1
- 1
- 3
0
votes
1 answer
CRA - how to proxy all requests but a specific one?
create-react-app docs says you can configure your proxy objects manually. I'm following the http-proxy-middleware docs on matching
to exclude a specific route but haven't got it to work.
Basically I'm serving my app from the /app route instead of…

Christopher Francisco
- 15,672
- 28
- 94
- 206
0
votes
1 answer
Dynamic Port in http-proxy-middleware route/path-rewrite
Is it possible to perform the following route/path-rewrite using http-proxy-middleware?
'/sec/port/xxx/yyy' => target:'https://someotherSite.com:port/xxx/yyy'
where the port is dynamic depending on the initial address i.e.
/sec/1234/xxx/yyy =>…

ben sladden
- 3
- 3
0
votes
1 answer
Node HTTP Proxy: Trying a different endpoint based on response
In short, we're using https://github.com/chimurai/http-proxy-middleware
and if the initial proxied endpoint returns a 404 or 500, we'd like to lead the request to a different endpoint instead.
i.e.
-> http://www.example.com (404)
->…

Sherwyn Goh
- 1,352
- 1
- 10
- 19
0
votes
2 answers
Proxied http response fails to set cookie
I'm developing a web application and testing it using Google Chrome 60.0.3112.113.
To simplify the development process I use a node.js development web server with http-proxy-middleware to proxy my API request to the backend.
Now when I send a HTTP…

strnmn
- 555
- 1
- 6
- 30