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.

176 questions
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:…
0
votes
2 answers

Configuring setupProxy.js using http-proxy-middleware

I am trying to configure a proxy server ( setupProxy.js ) within a create-react-app using HTTP-proxy-middleware to get access to a weather data API ( api.darksky.net ). I followed the steps within the React documentation (…
kelly_james
  • 1
  • 1
  • 1
  • 2
0
votes
1 answer

http-proxy-middleware to modify port only

I'm using an advanced proxy in create-react-app which uses http-proxy-middleware. I'd like to pass through the domain and modify the port only for all requests. I believe in create-react-app I must use the shorthand: app.use( '/api', proxy({…
Toby
  • 10,294
  • 6
  • 36
  • 62
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
  • 10,269
  • 2
  • 24
  • 38
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…
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 =>…
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,310
  • 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…
0
votes
1 answer

Angular CLI HTTP Proxy Cloud Function Configuration

Is it possible with Angular CLI and http-proxy-middleware to intercept/proxy calls to an external URL such as a cloud server-less function like Azure Functions or Firebase functions? For example, targeting an external cloud based function URL such…
0
votes
1 answer

webpack devServer and proxy shows a 404 page

where am I supposed to connect when I proxy to an third domain like that ? module.exports = { ... devServer: { proxy: { "/": { target: "http://www.example.org", }, changeOrigin: true } } ... } shouldn't…
Daniele
  • 787
  • 1
  • 10
  • 23
0
votes
2 answers

Vue-resource and http-proxy-middleware not routing to backend

I am new to Vue js and writing a front end for a simple task tracker app. I am trying to use vue-resource and http-proxy-middleware to have the app connect to my backend. Backend is on port 3000, and the Vue js front end is on port 8080. I used the…
Patrick
  • 90
  • 8
0
votes
0 answers

How to handle express routing where more than one route matches?

I have an express app set up using http-proxy-middleware, but I'm having a problem routing only a subset of requests through the proxy. Here is what my config looks like: app.use(/\/.*-img/i, proxy({changeOrigin: true, logLevel: 'debug', target:…
Ben H
  • 2,878
  • 2
  • 21
  • 32
0
votes
1 answer

Webpack / Angular CLI / Proxy forwarding

I need to setup a proxy within AngularCLI / Webpack env to forward requests from http://localhost:4200/rest to https://someserver.com/somepath/rest For one, the endpoint is a https and not a http. Secondly, the request url could be…
pop
  • 2,836
  • 2
  • 17
  • 34
0
votes
1 answer

Proxy Rewrite secure domain to insecure domain

As I have created wordpress blog which is hosted in NGINX webserver, and this webserver is running on 8090 port and it is insecure. So to access blog post I need to navigate as http://example.org:8090/blog and…
UIseeker
  • 97
  • 1
  • 10
1 2 3
11
12