268 questions
2
votes
1
answer
1k
views
Ghost in a subdirectory and over node-http-proxy
I'm trying to setup the Ghost blogging program (v0.4) in a subdirectory of another nodejs/express app. I was able to get it working following the steps outlined here: Node http-proxy and express
So, ...
0
votes
1
answer
2k
views
Error: connect EMFILE and node-http-proxy
I have a few node processes that I'm trying to reverse proxy into one localhost port. Node-http-proxy seemed like the simplest solution. I'm proxying to a couple of node.js process running express (...
4
votes
2
answers
3k
views
How to get response time of each proxy-request done by node-http-proxy?
i want to compute the response-time for each proxy-request, done by node-http-proxy, like this:
var httpProxy = require('http-proxy');
var proxy = httpProxy.createProxyServer();
require('http')....
4
votes
1
answer
1k
views
vhosts with http-proxy and express
I'm trying to emulate virtual hosts on nodeje express with http-proxy
code
httpProxy.createServer({
hostnameOnly : true,
router : {
'secure.domain.com' : '127.0.0.1:9000'
}
})....
0
votes
2
answers
864
views
Handle webservices with post method type in ExpressJS using http-proxy
I am developing a website using express.js and ember over node.
I have hosted my website in a ubuntu server and this website uses a set of webservices (which are running in some other different ...
0
votes
0
answers
757
views
ENOBUFS error running tests through Karma
I am using Karma to test my node server. After about a minute of running there is a "failed to proxy" error with error code 'ENOBUFS'. The error happens in 'karma/lib/middleware/proxy.js'. I have ...
1
vote
1
answer
2k
views
How to reverse proxy to local server without incoming ports opened using node.js
I have a local web server which has only outgoing internet access.
I have a public server on the cloud, which cannot access my local web server directly.
I want to find a way to have my local web ...
20
votes
4
answers
39k
views
Node http-proxy and express
I'm trying to do something like this:
// Setup prox to handle blog requests
httpProxy.createServer({
hostnameOnly: true,
router: {
'http://localhost': '8080',
'http://...
23
votes
3
answers
7k
views
Node.js http-proxy drops websocket requests
Okay, I've spent over a week trying to figure this out to no avail, so if anyone has a clue, you are a hero. This isn't going to be an easy question to answer, unless I am being a dunce.
I am using ...
9
votes
4
answers
3k
views
Accessing webservices from a website which is running behind a proxy
I am designing a website using ember and express over node. Its running in a server, say: SERVER_1.
I have few webservices running in another server, say: SERVER_2.
That is:
website in SERVER_1 ...
3
votes
1
answer
1k
views
Measuring traffic with node.js http-proxy
I wrote a small reverse proxy for hosting my applications on the same computer using http and node-http-proxy modules. For example:
I have:
proxy running on port 80
website1.com running on port 3000
...
0
votes
2
answers
1k
views
Authentication and cross domain error from a Node - Express application
I am developing an application using ember.js which is running over node.
Now, I have to call some external webservices and construct my home page accordingly (based on the webservice response).
...
0
votes
2
answers
2k
views
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: {
'...
1
vote
1
answer
1k
views
express node-http-proxy , proxy.proxyRequest to https server?
Is it possible to use the node-http-prox module and proxy.proxyRequest to a https server?
I tried to do the following but doesnt seem to work.
app.get('/c/users/moreuser', function(req, res) {
...
2
votes
1
answer
871
views
Running multiple Node apps on Node cluster
We need to deploy multiple Node/Express apps on a set of servers (behind load balancer). These apps are fully independent of each other in terms of functionality. I'll first explain how I am thinking ...
0
votes
1
answer
196
views
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. ...
0
votes
1
answer
3k
views
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',
...
4
votes
1
answer
3k
views
Proxying WebSockets through node-http-proxy doesn't work
These are the versions of node and required modules I am using:
Node.js: 0.10.16
Websocket Library: einaros/ws [email protected]
Proxy server: nodejitsu/node-http-proxy [email protected]
When I run the ...
0
votes
1
answer
144
views
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, ...
3
votes
2
answers
24k
views
Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authorization Required"
I was trying to hit the https url for google api.
Using the code below but its giving some errors.
but i can hitting one google api http url and its working very well without any error
...
1
vote
1
answer
2k
views
Using node-http-proxy, changing url with proxyRequest
When modifying a node-http-proxy example...
The Issue: When manually changing the req.headers.host to a remote host ('example.com'), the url in the the browser is not changing.
Note: I thought ...
5
votes
1
answer
6k
views
node.js http-proxy how to set timeout and a handler on request
I am using http-proxy on node.js. I have a proxy request to another server. my requirement is that the proxy request should timeout in 10 seconds. Also when the time out happens, I should be able to ...
4
votes
0
answers
445
views
http-proxy forward to a specific path
While trying out http-proxy with node.js, I have the following piece of code:
var httpProxy = require('http-proxy');
httpProxy.createServer(
require('proxy-by-url')({
'/AAA': { port: 80, host: '...
1
vote
5
answers
10k
views
creating a forward https proxy using http-node-proxy
I am trying to create a forward proxy capable of handling HTTPS websites as well. I am trying to observe and modify traffic for different sites. This is my code which works for http sites but not for ...
1
vote
1
answer
862
views
How to proxy all HTTP requests with node-http-proxy
I am trying to setup node-http-proxy. My goal is to put a proxy on my website. I could manually do this by doing the GETs on the server and then changing the links in the HTML but I would like to use ...
0
votes
1
answer
934
views
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....
1
vote
1
answer
2k
views
Accessing response headers using node-http-proxy
I am trying to modify the response with the help of a proxy created using node-http-proxy.
However I am not able to access the response headers. I want to access the response headers since I would ...
3
votes
1
answer
1k
views
node-http-proxy websocket timeout with Socket.io
For some reason http-proxy causes socket.io based websocket connection reconnect after every 2 minutes. Before reconnection messages are working just fine between client and server. If I bypass proxy, ...
2
votes
0
answers
783
views
Proxying WebSockets & HTTP using custom path with nodeJS to a separate NodeJS app?
CONTEXT
I am trying to build a new web app in NodeJS. This webapp uses two main components.
1) Code that I am writing within NodeJS - AKA my own logic flow.
2) A 3rd party open source NodeJS app - ...
1
vote
1
answer
752
views
HTTPS on Nodejitsu using Express
Okay. I have an app on express which also uses Socket.io and works fine via HTTP. However, now I have to move to HTTPS. Nodejitsu provide a lot of documentation on this. They suggest to use node-http-...
8
votes
1
answer
2k
views
Node http proxy with proxytable and websockets
I'm trying to get websockets to also work with node-http-proxy. The difference is i'm using a proxytable:
var options = {
router: {
'a.websterten.com': '127.0.0.1:150',
'b.websterten.com' : '...
2
votes
1
answer
4k
views
Get requests per second from node.js http server
Is there a way in node.js to get the number of open connections and number of requests per second from a http server?
Assume the following simple server:
http.createServer(function (req, res) {
...
14
votes
1
answer
19k
views
Forward every request with node-http-proxy
I'm trying to setup a node-http-proxy that just forwards requests.
In the end this proxy should inject javascript in every website I visit through the browser..
Right now, most pages are forwarded ...
0
votes
1
answer
313
views
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: ...
0
votes
1
answer
2k
views
"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 ...
11
votes
4
answers
22k
views
How to use node-http-proxy for HTTP to HTTPS routing?
Here's the module version that I'm using:
$ npm list -g | grep proxy
├─┬ [email protected]
A webservice calls into my machine and my task is to proxy the request to a different url and host with an ...
2
votes
2
answers
4k
views
node-http-proxy socket.io websocket connection
I'm trying to get node-http-proxy with socket.io to work, but it always falls back to xhr, websockets won't work, although I'm connecting to the upgrade event as described in the node-http-proxy docs.
...
5
votes
1
answer
6k
views
How to enable HSTS with node-http-proxy?
Under node.js 0.8, I'm using node-http-proxy in "router table" mode configured like so:
var httpProxy = require("http-proxy");
var config = require("./config");
proxyServer = httpProxy.createServer({...
1
vote
1
answer
5k
views
How to run node.js app on port 80 using http-proxy?
I want to run my node.js app on port 80 on Apache server. I have tried 2 methods one via Apache:
<VirtualHost *:80>
ServerName domainName.com
ServerAlias www.domainName.com
...
0
votes
2
answers
869
views
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 ...
5
votes
3
answers
6k
views
Get response from proxy server
I created a proxy server in node.js using the node-http-proxy module.
Looks like this:
var http = require('http'),
httpProxy = require('http-proxy'),
io = require("socket.io").listen(5555);
var ...
0
votes
0
answers
485
views
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 ...
0
votes
1
answer
92
views
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:...
8
votes
3
answers
12k
views
How to reverse proxy client POST & PUT requests using node-http-proxy
I'm trying to use the node-http-proxy as a reverse proxy, but I can't seem to get POST and PUT requests to work. The file server1.js is the reverse proxy (at least for requests with the url "/forward-...
3
votes
0
answers
669
views
node.js node-http-proxy, proxy with url-encoded data
I'm new to Node.js and struggling to understand how to create a simple proxy for a given route/url.
I'm trying to avoid cross-domain issues for a front-end javascript logging framework by using a ...
5
votes
1
answer
2k
views
EC2 hosted Node.js application - can't remotely connect to port
Update: Turns out the only problem was that I was behind a firewall that blocked some ports, but not 8000.
Edit: TL;DR: can't connect to port 9000 remotely, but port 8000 is ok and I don't know why :(
...
0
votes
1
answer
190
views
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 ...
6
votes
1
answer
4k
views
Node.js proxy with ability to change response headers and inject additional request data
I'm writing a node.js proxy server, serving requests to an API on different domain.
I'd like to use node-http-proxy and I have already found a way to modify response headers.
But is there a way to ...
13
votes
1
answer
10k
views
Load balancing with node.js using http-proxy
I'm trying to code a load balancing with node.js and http-proxy. I want a loadBalancer that shares incoming request treatment between 2 servers.
var http = require('http'),
httpProxy = require('http-...
17
votes
2
answers
13k
views
nginx vs node-http-proxy
Tell me please what is preferable to use for deployment of nodejs applications nginx or node-http-proxy. What is most robust?
The basic features I need are
proxy all requests to non 80 post
load ...