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
2 answers
create react app: setupProxy keeps returning 401 blocked by CORS policy, not working for remote urls?
this is my setupProxy code:
const { createProxyMiddleware } = require("http-proxy-middleware");
function proxy(app) {
app.use(
"/3.0/lists",
createProxyMiddleware({
target: "https://us19.api.mailchimp.com",
changeOrigin:…

gpbaculio
- 5,693
- 13
- 60
- 102
0
votes
2 answers
My React app is not registering setupProxy.js with http-proxy-middleware
I am trying to proxy to multiple API with setupProxy.js but its totally not working.
Only way i can proxy request in dev now is setting proxy string in package.json but its not solving my problem since i need to proxy to multiple endpoints and with…

Mikco
- 61
- 2
- 6
0
votes
1 answer
react app browser proxy with http-proxy-middleware
I've got problem with proxy in react app.
Target: I've got two react apps, first app is on localhost:3000 and second on localhost:3001. What I want? => When in first app I'll click on:
Then url…

Dominic
- 105
- 1
- 4
- 13
0
votes
1 answer
http-proxy-middleware React Python Flask not working as intended
I am using React for frontend and Python Flask for backend - I am a beginner in React.
I have setup React with a setupProxy; both the react server & flask server are setup in HTTPS with CA signed certificates
my http-proxy-middleware configuration…

DataGuru
- 757
- 7
- 17
0
votes
1 answer
@Types is not using the correct module (Typescript, http-proxy-middleware, webpack, react)
I'm trying to use a similar setup to this repo to try and create a fullstack typescript app using React and Express.
The repo uses tsc-watch like nodemon to keep an eye on the server files, and then webpack-dev-server to host the react static files…

Raph117
- 3,441
- 7
- 29
- 50
0
votes
0 answers
React middelware proxy is not converting the url
I have created this project where I need to get information from a server. I have used the createProxyMiddleware from http-proxy-middleware for many months in this project without any problem. But today it just stopped working and I din't change…

Stephen
- 913
- 3
- 24
- 50
0
votes
1 answer
Using http-proxy-middleware with typescript and cross-env
I am trying to set up a proxy for my React TypeScript app using http-proxy-middleware to prevent CORS errors while developing.
I have this in my project:
proxy/proxy.tsx
import * as express from 'express'
import { createProxyMiddleware } from…

Raul Špilev
- 288
- 4
- 18
0
votes
2 answers
Node express server use middleware only for localhost
I have express server and I use middleware like this:
server.use('/api/*', createProxyMiddleware({
target: 'https://dev.apiserver.dev',
secure: false,
logLevel: 'debug',
changeOrigin: true,
cookieDomainRewrite:…

O. Shekriladze
- 1,346
- 1
- 19
- 36
0
votes
2 answers
"React Proxy error: Could not proxy request /api/ from localhost:3000 to http://localhost:5000 (ECONNREFUSED)'? Error.. No solution online
I am trying to connect my react frontend to the backend i tried everything but its still not working. I added "proxy" : "localhost:5000"
and no luck. I tried
const { createProxyMiddleware } = require('http-proxy-middleware');
module.exports =…

Adil Khan
- 43
- 1
- 6
0
votes
1 answer
Proxy does not work on express. Seems it's not defined
I'm trying to config multiple apps on a single server using the following tutorial on Node.js:
https://itnext.io/hosting-multiple-apps-on-the-same-server-implement-a-reverse-proxy-with-node-a4e213497345
Then in the following code, proxy is seems to…

Ivo Tebexreni
- 155
- 1
- 2
- 15
0
votes
1 answer
Denial of Service http-proxy: Ionic Angular
I've got Ionic Angular project, and today after i installing some npm packages,
it shows found 3 vulnerabilities (1 low, 2 high) message at the end.
And when i run npm audit it returned…

pl-jay
- 970
- 1
- 16
- 33
0
votes
1 answer
How to setup http-proxy-middleware using same endpoint for different api url | React | Axios
I am trying to setup http-proxy-middleware for multiple API URLs with same end point, which is not working.
setupProxy.php
const proxy =require("http-proxy-middleware");
module.exports = function(app)
{
…

T Bharathiraj
- 41
- 2
0
votes
1 answer
Proxy request to local file
I have proxy config like that:
proxy: {
"/api/smth": {
target: "http://api.example.com/",
secure: false,
changeOrigin: true,
},
}
Now I want to redirect api calls /api/*/meta to local files %PROJ_ROOT%/meta/*.json.
How can I…

Qwertiy
- 19,681
- 15
- 61
- 128
0
votes
1 answer
How to GET data from a remote server using Node
I'm trying to send a GET request to an external link [1]: https://bpdts-test-app.herokuapp.com/user/3 in attempt to store the data locally and manipulate it.
After using http-proxy-server I was able to access this link and display the data on a…

Maaz
- 69
- 1
- 6
0
votes
1 answer
How do I make fetch requests to dynamic targets, remote non-cors enabled urls? In http-proxy-middleware, can variables be used in targets?
I use fetch('htp://list-of-servers') that returns a list of urls
test1.example.com
test3.example.com
test5.example.com
Then I need to perform a fetch() on each one of these urls: fetch('test1.example.com').then(...)
urls.map(url =>…

Noon Time
- 976
- 7
- 17