Questions tagged [node-http-proxy]

A full-featured http proxy for node.js

271 questions
0
votes
1 answer

node-http-proxy set img request headers

Is it possible to set request headers for img src attributes, using node-http-proxy? I'm getting a 401 error because my server is expecting a header property: value for every request, incuding img src attributes. I'm setting the headers for all…
neridaj
  • 2,143
  • 9
  • 31
  • 62
0
votes
1 answer

Node http-proxy - HTTP message contains illegal headers

Using node http-proxy module, I have no issues when proxying to a host with GET. But when I use POST and proxy to the same host, I get Status Code:400 Bad Request with HTTP message contains illegal headers. I checked out the proxyReq headers and…
dman
  • 10,406
  • 18
  • 102
  • 201
0
votes
1 answer

More elegant way of creating reverse proxy with Node.js

I'm using hapi.js for serving html content in an application. Now I needed to proxy some services which may use websockets. Here is the working code that proxies http://localhost:4000 in http://localhost:5000/my/app : hapi = require "hapi"…
ceremcem
  • 3,900
  • 4
  • 28
  • 66
0
votes
1 answer

http request does not emit 'end' after proxy

I need to be able to use the http request body in my request proxy application and then again in the actual web service. I am using restreamer to 'reset' the stream (and even wrote the middleware myself with no change). The web service receives the…
ngourley
  • 243
  • 2
  • 8
0
votes
1 answer

How to get HTTP METHOD in http-proxy when proxying a session?

I am using Node.js and module http-proxy (link here) to proxy requests in my server. Detecting DELETE requests What I want to achieve is performing certain action when an HTTP DELETE request is sent. Poor doc How can I do this? Module http-proxy…
Andry
  • 16,172
  • 27
  • 138
  • 246
0
votes
1 answer

How do I do a 302 redirection with node-http-proxy?

My code: var path = require('path'); var util = require('util'); var http = require('http'); var fs = require('fs'); var httpProxy = require('http-proxy'); httpProxy.createProxyServer({ target: 'http://localhost:9000', agent:…
dopatraman
  • 13,416
  • 29
  • 90
  • 154
0
votes
1 answer

Node.js, Express & Ghost Subdirectory URL parsing error

Welcome to another question about serving Ghost on a subdirectory of a site! I've set up a proxy server as per many threads have detailed (still no documentation....) and this Github profile details…
kgilvi3
  • 305
  • 3
  • 12
0
votes
0 answers

Ember CLI proxy to a POW server

How can I get EmberCLI to proxy to a POW server? I'm using ember-cli master with the new explicit proxies (https://github.com/stefanpenner/ember-cli/pull/1530). This for example doesn't work: var Proxy = require('http-proxy'); // For options,…
Matt Beedle
  • 171
  • 1
  • 9
0
votes
1 answer

node-http-proxy load balance websocket error

I have just started evaluating the node-http-proxy because I need to have a scalable web socket server. I have tested the ’simple-balancer-with-websockets’ example provided in the repository but it does not work when acting as a proxy to multiple…
0
votes
1 answer

Incorrect statusCode from http-proxy

This is a small proxy program I wrote to test some case. var httpProxy = require('http-proxy'), connect = require('connect'), endpoint = { host: 'googleeeeeee.com', // or IP address port: 80, }, staticDir =…
Nandish A
  • 1,645
  • 5
  • 26
  • 41
0
votes
1 answer

How to get response object in a nodejs proxy request

I have a nodejs program that directs the incoming request to a couchDb server. This is the code /*! * Middleware for forwarding a request to CouchDB. */ /** * Module dependencies. */ var httpProxy = require('http-proxy'), util =…
Nandish A
  • 1,645
  • 5
  • 26
  • 41
0
votes
1 answer

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 (port 3100 & 3000 in the example below), and a…
stockholmux
  • 1,169
  • 11
  • 24
0
votes
2 answers

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 server). To avoid cross domain issue (while calling…
user915303
0
votes
0 answers

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 read a similar issue here: Very simple Node.js…
Arwen Pond
  • 33
  • 1
  • 5
0
votes
2 answers

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). These webservices are running in some external…
user915303