A full-featured http proxy for node.js
Questions tagged [node-http-proxy]
271 questions
0
votes
2 answers
socket.io example sometimes not connecting client side when using a reverse proxy
Using node-http-proxy, I've set up a reverse proxy for routing requests:
var httpProxy = require('http-proxy');
var server = httpProxy.createServer({
hostnameOnly: true,
router: {
'www.example.com': 'localhost:3002'
…

Guido Passage
- 1,040
- 1
- 10
- 15
0
votes
1 answer
Run a custom function when using the routing table on a reverse proxy with node-http-proxy
I have found it's easy to use node-http-proxy to route a sub-directory to different ports on a local server. However, I haven't found if there's a way to run a custom function when doing the routing. What I want to do is:
If the service on the…

Mark Ebersole
- 783
- 1
- 7
- 9
0
votes
1 answer
Node https forward proxy client-server
I'm trying to use Node's request module to make a request to https url. Code snippet below.
var request = require('request')
,r = request.defaults(
{'proxy':'https://localhost:8443',
strictSSL: false,
rejectUnauthorized:…

Gireesh
- 677
- 7
- 14
0
votes
1 answer
Node http-proxy find proxied URL
I'm trying to debug why I get a 404 from a proxied server when use http-proxy. Is there a way I can find out what the proxied URL is?
This is my current config:
app.all('/api/*', function(request, response, next) {
return…

Ahmed Nuaman
- 12,662
- 15
- 55
- 87
0
votes
1 answer
Send user/pass from IE8/9 to node.js proxy
We have backbone.js application that is using rest API. With every request user/pass should
be send to the API. This is how we send the request:
`Backbone.BasicAuth.set(tempUser, tempPass);
this.fetch({
error: function(){
//…

onetwo12
- 2,359
- 5
- 23
- 34
0
votes
1 answer
Tornado does not handle node-http-proxy websockes on linux
If I start a server python wsserver.py and then run python wsclient.py --host localhost --port 8888 the tornado server and client behave as expected.
However, if I start up a proxy server as well: node node_modules/http-proxy/bin/node-http-proxy…

srossross
- 1,353
- 11
- 16
0
votes
1 answer
"Proxying http from https using two certificates"
I've been trying to make work "Proxying http from https using two certificates" with the last version of Nodejs currently available (v0.10.2) but I've not been able to do it.
I did this with one certificate and it works:
var https =…

fuentecilla86
- 1
- 2
0
votes
2 answers
How can I proxy Wordpress with node-http-proxy, my wordpress redirects to a different port
I want to proxy my Wordpress which is hosted at localhost at port 8888.
When I http to this node-http-proxy as follows http:// localhost:8001/ it re-directs to http:// localhost:8888/. I mean that Wordpress does the re-direct because Wordpress…

Phil
- 46,436
- 33
- 110
- 175
0
votes
0 answers
Stop proxy server transforming HTTP POST to HTTP GET
I have a web app, which has a dashboard functionality. The app is used by many different companies in many different environments, all browsers.
There is a piece of javascript that refreshes that dashboard every 60 seconds via an http POST to a…

Nik
- 2,718
- 23
- 34
0
votes
1 answer
Node HTTP proxy routetable else / not found
I have a node-http-proxy server using the proxytable configuration:
var options = {
router: {
'a' : '127.0.0.1:81',
'b': '127.0.0.1:82',
'c': '127.0.0.1:83',
'else' : '127.0.0.1:5000'
…

Tarang
- 75,157
- 39
- 215
- 276
0
votes
1 answer
node.js not automatically passing library JS when there is http proxy
I have a node-http-proxy set up to forward site/n requests to node.js (at port 9000), and other requests to apache (port 8000). This is because I heavily make use of socket.io, and I don't want apache creating one thread per websocket request.
The…

apscience
- 7,033
- 11
- 55
- 89
0
votes
1 answer
node http proxy doesent route to host.com but instead host.com@localhost?
Going nuts on..
This
var app = express(),
proxy = new httpProxy.HttpProxy({
target: {
host: 'host.com',
port: 5280 // Port of XMPP server
}
});
..
// Proxy BOSH request to XMPP server
app.all('/http-bind',…

Rubytastic
- 15,001
- 18
- 87
- 175
0
votes
2 answers
basic node website returns "Cannot GET /" when hosted with forever.js
I'm trying to get my first production node website up (just a basic hello world on my production web server).
The below is what I'm using (basic http proxy to pass off apache websites to port :9000 and node websites to port :8000). I know this part…

Toran Billups
- 27,111
- 40
- 155
- 268
0
votes
1 answer
Combining forward and router for node-http-proxy
I'm hosting multiple Node apps on one AWS instance. I've been using apache with virtual hosts but want to only use Node. The node-http-proxy looks like it will do the task but I can't get the forwarding to work with a proxy table.
Here's how proxy…

randylubin
- 55
- 1
- 5
-1
votes
1 answer
node-http-proxy pathRewrite with url params
Is there a convenient way with node-http-proxy to rewrite an entire url including params?
I would like to do something similar to this:
module.exports = () => ({
"customer/:customerId":"customer?id=:customerId"
});
So I want that the customerId…

Fabian Lurz
- 2,029
- 6
- 26
- 52