Questions tagged [node-http-proxy]

A full-featured http proxy for node.js

271 questions
0
votes
1 answer

node http proxy port number to accept SSL traffic

Following example is taken from the github page of node-http-proxy HTTPS -> HTTP // // Create the HTTPS proxy server in front of a HTTP server // httpProxy.createServer({ target: { host: 'localhost', port: 9009 }, ssl: { key:…
vjjj
  • 1,019
  • 3
  • 10
  • 35
0
votes
2 answers

Proxy subdomain of one domain the subdomain of another domain

I want to setup a basic proxy like the one browser-sync has, for example I want to go to web1.domain1.xyz and it should proxy to web1.domain.xyz (so it's anything.domain1.xyz to anything.domain.xyz) I got this part working already : // HTTP Proxy…
XkiD
  • 159
  • 1
  • 14
0
votes
1 answer

Router in Node http proxy

Can anyone please explain what the router in options does in this code. I got this code from a blog. I am trying to implement node http-proxy. var http = require('http'), httpProxy = require('http-proxy'); // //Leave out the…
bharadwaj
  • 492
  • 1
  • 4
  • 13
0
votes
1 answer

Proxy between HTTP front-end and HTTPS back-end

For local development on Windows, I'm serving an HTTPS back-end with client certificate authentication on Apache Tomcat at https://localhost:8443/api, and an HTTP front-end at http://localhost:3000/ on Node (Koa). How can I connect these two for…
0
votes
1 answer

Setting up multiple HTTPS servers listening on the same port in Node

By not specifying a protocol, the following block will result in an HTTPS server that uses TLS 1.2: var options = { key: fs.readFileSync("security/server.key"), cert: fs.readFileSync("security/server.crt") }; https.createServer(options,…
David Jones
  • 10,117
  • 28
  • 91
  • 139
0
votes
0 answers

Issues with node http-proxy module for implementing forward proxy

I am using the nodejitsu node-http-proxy module to implement a forward proxy. Here is my simplified code: var httpApp = require('express')(), http = require('http'), httpProxy = require('http-proxy'); httpServer =…
Sunny
  • 9,245
  • 10
  • 49
  • 79
0
votes
1 answer

how can i see/modify the final url that ember http-proxy hits

Http-Proxy, like adapter, adds "/store-name" at the last of the proxy target that I specify. I want to have complete control of the URL ,or atleast I should be able to add suffix to the url. The file server/proxies/members.js looks like this for…
0
votes
0 answers

NodeJS: Working HTTP Proxy sometimes throws Error Connect ECONNREFUSED

I have two servers running on port 3000 and 3001. The main proxy server redirects all requests on port 80 to the specific servers. An IP 123.123.123.123 will be redirected to port 3000, and the domain example.com to 3001: var proxy1 = new…
Luca Steeb
  • 1,795
  • 4
  • 23
  • 44
0
votes
0 answers

node-http-proxy How to proxy pdfkit response?

I'm trying to figure out how to proxy a request of a pdf file generated at runtime with pdfkit. Response headers of the backend service are set to res.setHeader('Content-type', 'application/pdf'); // only if req.params.view !=…
Viciè
  • 3
  • 4
0
votes
1 answer

Proxy request more than on time provide error

I wanted to proxy a call to new port so I encapsulate all the logic of create server to a function like var appRouter = express.Router(); app.use(appRouter); appRouter.route('*') .get(function (req, res) { proxyRequest(req, res) …
07_05_GuyT
  • 2,787
  • 14
  • 43
  • 88
0
votes
1 answer

Error while trying to re-direct application to new server port

Im creating new server to listen to new port(with the second create below),now when I call to the application with some port I want to redirect it to the new created server port, and put the message in the browser "Request route to on 9009" I use…
07_05_GuyT
  • 2,787
  • 14
  • 43
  • 88
0
votes
1 answer

(double proxy) node js create proxy server behind corporate proxy using node-http-proxy

I have anodejs application that uses node-http-proxy to create a proxy to send the incoming requests for example: http://localhost/api/login to https://server1/api/login. here is the code used : var httpProxy = require('http-proxy'); var proxy =…
Ahmed Abbas
  • 118
  • 8
0
votes
1 answer

How to create node http proxy pointing to bluehost subfolder?

I have a blog here. And this is what I do: var httpProxy = require('http-proxy'); var apiProxy = httpProxy.createProxyServer(); app.get("/blog/", function(req, res){ apiProxy.web(req, res, { target:…
Leg0
  • 510
  • 9
  • 21
0
votes
1 answer

nodejs proxy timing and async behavior

I have a question about the code below: I would need a confirmation that all the processing done in proxyRes event will be done asynchronously and all processing time in it won't affect the proxying time. Thank you in advance for help in this …
Alessandro
  • 1
  • 1
  • 3
0
votes
1 answer

SNICallback can be used without any browser?

I have to use SNICallback on my project for separate two HTTPS addresses on the same port. One of the addresses is used for API calls like https://api.myDomain.com/products and between two computers without any browser. But I've read the below…
efkan
  • 12,991
  • 6
  • 73
  • 106