15 Commits

Author SHA1 Message Date
François Leurent
220f5fb795 Expose full callback names 2016-10-22 11:45:16 -04:00
François Leurent
61c2889109 Do not rely on func.name (no scope) 2016-10-22 11:45:16 -04:00
Niranjan Ojha
2d01edc5a5 not setting connection header in case of http2 as it is deprecated 2016-10-06 16:24:44 -04:00
briman0094
84087208dd Properly write response header optionally including statusMessage (#1061) 2016-09-14 17:08:26 -04:00
Cole Chamberlain
d8fb344715 Fix for Reason-Phrase being overwritten on proxy response. (#1051)
* Fix for Reason-Phrase being overwritten on proxy response.

Calling res.writeHead has the side effect of defaulting the Reason-Phrase to default ones.  I'm using Reason-Phrase codes to sub-route api responses and they were all being reset.  This change only sets the statusMessage (Reason-Phrase) if it exists on the proxyRes and is successfully passing it through in my tests.

* Fixed spaces and bracket formatting.
2016-09-13 18:19:33 -04:00
Jeremy Judeaux
1e52f660f0 cookieDomainRewrite option (#1009) 2016-08-12 13:42:18 -04:00
Gabriel Boucher
183b5bb4fc Location rewriting for responses with status 201 (#1024)
Implement rewriting of the location header for responses with status code 201, according to RFC2616 section 10.2.2
2016-08-11 12:36:17 -04:00
Mihai Ene
284903d379 Sanitize header keys before setting them (#997)
Fixes #996.
2016-04-26 13:26:35 -07:00
merpnderp
3b39d2c3dc Added check to passes/web-outgoing.js to make sure the header being set is not undefined, which should be the only falsey value that could accidently show up and break that call. This fixes windows NTLM auth issues behind http-proxy. 2016-01-22 09:17:14 -06:00
Matt Hauck
26029ba7ac only rewrite redirect urls when it matches target
if functioning as a reverse proxy for host1.foo.com,
with a backend target of backend.foo.com:8080, the
node proxy should only rewrite the redirect if it is
a redirect to somewhere on backend.foo.com:8080
2015-03-09 13:17:52 -07:00
Matt Hauck
7f2f3ac35c Add support for auto host rewriting and protocol rewriting
auto host rewriting allows rewriting to work as expected in most
cases without extra cumbersome configuration

protocol rewriting allows node-http-proxy to be able to listen
over HTTPS and properly reverse-proxy to sites running over HTTP
(to avoid doing SSL twice)
2015-02-05 12:17:26 -08:00
Jarrett Cruger
8d68ac0e0f [fix] be defensive and ensure location is in headers before running url.parse() 2014-11-25 17:22:23 -05:00
Jarrett Cruger
48ae5d828c [minor] style consistency 2014-11-25 17:21:24 -05:00
Sam Saccone
daf66a7a88 Allow optional redirect host rewriting. 2014-11-23 19:22:07 -05:00
indexzero
bb0d28c587 [refactor minor] s/caronte/http-proxy/ or s/caronte/httpProxy/ where appropriate. 2013-09-26 03:37:08 -04:00