Questions tagged [http-proxy-middleware]

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.

241 questions
1
vote
0 answers

Multiple proxy works locally but not working on server react

I install this package http-proxy-middleware to consume multiple end points in react 17.0 I placed setup/setupProxy.js file src/ Problem is multiple proxies called locally working fine, but the problem is when I deployed the build on the server…
1
vote
1 answer

Using JWT cookie between nextjs and back-end api

I have a nodejs express back-end api which is implemented with authentication approach of JWT + cookie . Now I want to connect it with a nextjs front-end which is on another domain . I know this is viable with proxy, but since nextjs app needs the…
4seasonn
  • 75
  • 6
1
vote
2 answers

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 request through it (the results are displayed in an…
user2943799
  • 947
  • 2
  • 13
  • 23
1
vote
1 answer

Angular proxy.conf, secure:false stops the request from going, Angular CLI bug?

I have a proxy conf file setup. I am at a complete loss no idea what is going on after a day of Googling. { "/auth/*": { "target": "https://auth-group-qa.company.io/", "pathRewrite": { "^/auth": "" }, "secure":…
apaul
  • 127
  • 10
1
vote
0 answers

Edit path but keep the url with http-proxy-middleware

I am trying to re-write path in a specific way, but can't get the result I desire, and can't seem to figure out what I am doing wrong. I have the following setup: I have apps.eugene-dev.com point to my server. On my server I have several apps…
1
vote
0 answers

Springboot Webflux + Reactjs Events onmessage is not able to fetch messages when using setupProxy.js as proxy url from Ui to backend

I am using http-proxy-middleware in my reactApp. Backend is implemented in Springboot . Springboot Webflux is being used to send the Flux data to UI . When I am directly using eventSource.onmessage = (event) => { console.log(event); …
1
vote
1 answer

localhost:3000 This site can’t be reached after installing http-proxy-middleware

I am building a newsletter sign-up form that uses .netlify-lambda to send my form submission to Mailchimp. I installed http-proxy-middleware to help the front end find the netlify-lambda folder. After writing the proxy setup code below my React…
lachnroll
  • 147
  • 1
  • 12
1
vote
0 answers

How to rewrite returned paths when using a proxy

I have a use case where 2 applications are hosted on the same system, 1 externally (from the system) accessible, and 1 only accessible via localhost:8081. I have tried http-proxy and http-proxy-middleware. In both cases I can get things partially…
Ty Savercool
  • 1,132
  • 5
  • 10
1
vote
0 answers

Link tag in React is not working with devserver-proxy

I'm following this tutorial to make my React app (localhost:3000) communicate with Node server (localhost:5000) .. so instead of typing Login with Google I only want it to be just '/auth/google', but when…
1
vote
0 answers

http-proxy-middleware returns 404

I have a React application and I'm adding the http-proxy-middleware. My goal is to redirect all the requests to /recipes and /users to my new proxy middleware, so I added to the app.js the following lines of code: import { createProxyMiddleware }…
1
vote
1 answer

Why do we need proxy in create react app?

In some of projects I encountered in create-react-app people use file setuProxy.js which has content like this inside: const proxy = require("http-proxy-middleware"); module.exports = function (app) { app.use( proxy("/api/mobile-activity/ws",…
user17430594
1
vote
0 answers

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 created a http-proxy-middleware that runs at…
1
vote
0 answers

Flower and http-proxy-middleware

[EDIT] I was able to fix the CSS errors described below with the following in my https_server.js: function flowerGetMethods(app, endpoint, certified) { if (certified) { var options = { logLevel: 'debug', target:…
Connor
  • 545
  • 4
  • 20
1
vote
0 answers

API always return 500 when i used http-proxy-middleware

To summarize, I have to contact an API server that I don't have control over and the providers refuse the slightest change. I can't connect to it from my application (vue.js) because of CORS error. So I decide to use http-proxy-middleware to make a…
Enzo B.
  • 2,341
  • 1
  • 11
  • 33
1
vote
0 answers

How to correctly set up websocket proxy using http-proxy-middleware in react app

I created a react app with create-react-app, and tried to set up websocket proxy with http-proxy-middleware. Here is the configure. const { createProxyMiddleware } = require('http-proxy-middleware'); let remote_url =…