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
1
vote
0 answers
Webpack dev server proxy not working
I am trying to set webpack dev server proxy. However, I am getting following error:
500 - Error occurred while trying to proxy to: localhost:8080/abc/v1/user/search/?id=123122
Here is my webpack devserver config:
proxy: {
…

Peter
- 10,492
- 21
- 82
- 132
1
vote
0 answers
Proxying a c# HttpWebRequest with nodejs
I'm using nodejs http-proxy-middleware to forward requests.
const my_proxy = httpProxy({
target: http://my-service:80,
changeOrigin: true,
onProxyReq: (proxyReq, req, res) => {
proxyReq.setHeader('auth-source', my_auth_source)
…

Maxime VAST
- 540
- 6
- 22
1
vote
0 answers
Setting the body of a http-proxy-middleware Proxied Request
I'm still new still newish to node, and having some troubling figuring out how to set a new response body with the http-proxy-middleware package.
That is, I have the following small program that proxies requests
var express =…

Alana Storm
- 164,128
- 91
- 395
- 599
1
vote
0 answers
Express JS: Superagent does not use http-proxy-middleware
I am writing a node application using express JS. Usually in this application we consumes res apis and merge them in one object and send it to angular application.
As a rest client I am using superagent. One of my colleague has written reverse proxy…

Nothing
- 11
- 3
1
vote
1 answer
how to reverse-proxy a client/user from one server to another using nodejs?
i was looking a for a way to reverse-proxy my application which is running on localhost:7200 to another server running on 10.0.0.1:3000 by using a POST request
apiRoutes.post('/route', function(req, res) {
res.json({ message: 'Done' });
var…

Karan Singh Kochar
- 106
- 1
- 11
1
vote
1 answer
http-proxy-middleware create new session for per request
I build a proxy with http-proxy-middleware and it generates new session for every request, thus I can't validate the login status with token store in session.anynoe has idea to resolve this issue.

Chad Ding
- 21
- 4
1
vote
1 answer
http-proxy-middleware not proxying requests if placed after cookieparser
The middleware works properly if placed before the cookie parser.But
the session becomes undefined.
If i move the proxy middleware after the cookie parser it does not
proxy requests silently fails without any errors.I tried creating a post…

LoneRanger
- 665
- 13
- 31
1
vote
2 answers
webpack-dev-server - support for POST, PUT, Delete Methods using proxy
I am using webpack-dev-server as a proxy to my original API URL to avoid CORS related issues and dynamically pointing to Dev, UAT, Mock server URL based on the environments.
For Mock dev - I prefer to use the JSON from the local file system and it…

Ravi Roshan
- 1,177
- 2
- 11
- 28
1
vote
3 answers
Scrapy doesn't load HttpProxyMiddleware at startup
I have created a new project as follow
scrapy startproject test
scrapy genspider test1 example.com
and change settings.py as follow:
# -*- coding: utf-8 -*-
# Scrapy settings for test project
#
# For simplicity, this file contains only settings…

RdlP
- 1,366
- 5
- 25
- 45
1
vote
1 answer
Using a simple vue.js/webpack setup, how does one configure the dev server to proxy everything EXCEPT a few .js and .vue files?
So some quick background on the site's current setup:
My company's site currently runs off of a CMS. All pages are generated and routed via the CMS, so there are no .html files anywhere. It's all generated via razor (.cshtml), the CMS as a…

David Vasquez
- 1,163
- 1
- 15
- 22
1
vote
0 answers
websockets with lite-server and http-proxy-middleware
In my development environment I have to proxy requests as well as websocket connections to the respective backend service.
For this I am using lite-server and http-proxy-middleware.
My lite server config file looks like this:
var proxyMiddleware =…

newBee
- 1,289
- 1
- 14
- 31
0
votes
0 answers
Why is my proxy exposing the URL it's proxying
I have a limited understanding of proxies, but from what I know they are supposed to improve security by hiding the URL of a service through an intermediary.
I have a NextJS server with an API route the acts as a proxy. Basically, it takes in…

rabbibillclinton
- 410
- 4
- 17
0
votes
1 answer
Http-proxy-middleware with ExpressJS returns error while proxying to http://jsonplaceholder
I am basically following the code in here.
I generate my Express project using npx express-generator
In my routes/index.js I do this
var express = require("express");
var router = express.Router();
const {
createProxyMiddleware
} =…

keylogger
- 822
- 3
- 19
- 39
0
votes
0 answers
Node Proxy Failing on Login
I've created a very basic Node Express Proxy server using the http-proxy-middleware module. I'm able to reach the target url which is a login page. However when I try to login to the page I get a '400 Bad Request' error. If I access the same page…

Alt_J
- 1
- 2
0
votes
0 answers
Cors Error in Node.js Proxy Server using http-proxy-middleware
This is my code of Node.js Proxy Server.
const express = require('express');
const { createProxyMiddleware } = require('http-proxy-middleware');
const cheerio = require('cheerio');
const cors = require('cors');
const app = express();
const…

Silent Sea
- 1
- 1