Ramprasad Rajendran
0933f1c598
Fix bug: x-forwarded-proto set incorrectly
...
When routed via multiple proxies, x_forwarded_proto set as httphttps or
wswss instead of http,https or ws,wss, since + operator seems to have a
higher precedence than the terniary operator and the expression was
getting evaluated to true always
2012-06-19 12:00:24 +05:30
Ryan Stevens
ca37ad7436
[fix] x-forwarded-proto sets properly
...
The ternary was evaluating truthy for "," + req.connection.pair which is always true because its always a non empty string. Wrapped actual condition to properly concatenate the product of the ternary. let me know if you prefer the style (req.connection.pair ? 'https' : 'http')
https://github.com/nodejitsu/node-http-proxy/issues/250
2012-05-22 12:54:47 -07:00
Marak Squires
f20b3740b1
Merge branch 'master' of github.com:nodejitsu/node-http-proxy
2012-03-28 22:36:23 -07:00
indexzero
c81bae2fdd
[fix minor] Correctly set x-forwarded-proto in WebSocket requests
2011-12-23 01:40:35 -05:00
indexzero
6f8ad3b8c3
Merge branch '0.6-compatibility'
2011-12-23 01:34:02 -05:00
indexzero
3828616816
[refactor] Listen for socket events since reverseProxy.socket is no longer set synchronously
2011-12-23 01:33:24 -05:00
Maciej Małecki
4d43d81e5c
[fix] When client request is aborted, abort server request
2011-12-18 22:49:18 +01:00
Charlie Robbins
9f05e6c567
Merge pull request #165 from elfsternberg/master
...
Fix issue where front-end is HTTPS, back-end is HTTP, and server issues a redirect.
2011-12-13 22:21:51 -08:00
indexzero
5b52c89694
[refactor] Updates to support http2 from @mikeal
...
Conflicts:
lib/node-http-proxy/http-proxy.js
2011-12-14 01:45:52 +01:00
Maciej Małecki
86b4122323
[v0.6] http.Agent uses different structure for sockets
2011-12-14 01:45:44 +01:00
Maciej Małecki
6655e01642
[v0.6] Don't use agent.appendMessage()
...
Instead, just perform a request.
2011-12-14 01:45:34 +01:00
Marak Squires
f086692619
Merge branch 'master' of github.com:nodejitsu/node-http-proxy
2011-12-05 14:20:32 -08:00
Ken "Elf" Mathieu Sternberg
411bb51cc6
Fix issue where front-end is HTTPS, back-end is HTTP, and server issues a redirect.
...
This handles the case where a back-end web application such as Django or
Rails issues a redirect and automatically decorates the URL with the
protocol with which it was addressed. If the back-ends are internal and
HTTP-only, then they'll issue a URL with 'http://' as the protocol.
This must be fixed before leaving the proxy.
This also handles the (unusual) case where a back-end speaks only
https://, but the user is deploying node-http-proxy to make that service
available to non-SSL capable browsers. Works only with 301 and 302
codes.
2011-11-29 10:10:16 -08:00
Samyak Bhuta
621f9b425a
Allowing the common proxy headers' value to be appended in proxy chain scenarios.
2011-11-28 08:56:45 +00:00
Cloud9
2061c71366
Revert "update outgoing.headers.host incase the destination does proxying"
...
This reverts commit 65b7872e6ad433deae4de823c63629cb341bd649.
2011-11-16 16:42:07 -08:00
koichik
152d258ea0
[fix] Avoid Transfer-Encoding: chunked for HTTP/1.0 client, closes #59 .
2011-11-16 16:10:00 -08:00
Marak Squires
6a9751eb0d
Merge branch 'master' of github.com:nodejitsu/node-http-proxy
2011-11-16 15:19:01 -08:00
Camilo Aguilar
c98ccb40e9
Fixes memory leak when clients abort connections
2011-11-15 20:20:47 -05:00
Dominic Tarr
f27d26f451
changeOrigin option: set the host header to the proxy destination
2011-11-15 07:41:09 +11:00
Dominic Tarr
65b7872e6a
update outgoing.headers.host incase the destination does proxying
2011-11-11 12:27:21 +11:00
Dominic Tarr
182dcd3455
always emit end in 0.4
2011-11-10 16:44:23 +11:00
root
c83d88ee88
Revert "[refactor] Improved event handler cleanup "
...
This reverts commit 9f923325d08ac018a3325beaa9e0805b5eda61e6.
2011-10-25 16:13:43 +00:00
Marak Squires
9f923325d0
[refactor] Improved event handler cleanup
2011-10-25 09:09:40 -07:00
Marak Squires
9e630daf81
[minor] Indentation fix
2011-10-25 06:25:15 -07:00
Marak Squires
63ac925260
[refactor] core proxy logic. all tests should be passing.
2011-10-25 06:18:35 -07:00
bradleymeck
7feee194f8
[fix] only set one drain listener while paused
2011-10-22 13:13:10 -05:00
Fedor Indutny
45ef87e71b
[websockets] add latest websockets support
2011-09-30 03:28:46 +02:00
Joshua Holbrook
1f33943b23
[fix] connection.socket -> socket for source of x-forwarded-for data
2011-09-20 14:34:03 -07:00
Joshua Holbrook
2677bb6c44
[fix] x-forwarded http headers should set properly.
2011-09-20 13:00:59 -07:00
indexzero
0eb4917ded
[fix] Add x-forward-* headers for WebSocket requests. Closes #74
2011-09-10 06:57:51 -04:00
indexzero
f765f90ec3
[api] Finalized the RoutingProxy API
2011-09-10 03:55:07 -04:00
indexzero
598fe2e38d
[api doc] Rebuilt httpProxy.createServer() with the newer high-level RoutingProxy API
2011-09-09 18:14:49 -04:00
indexzero
5927ecd62a
[api test dist] Stubbed out the API for the higher-level RoutingProxy object to be exposed by node-http-proxy
2011-09-08 18:22:38 -07:00
indexzero
0eae2a913a
[api] Added new close() method which cleans up sockets from HttpProxy instances
2011-09-08 16:55:45 -07:00
indexzero
ec03d72c5d
[minor] Move private methods to the bottom of file(s)
2011-09-08 16:53:42 -07:00
indexzero
0c71119ee5
resume() can throw
2011-09-08 16:41:42 -07:00
indexzero
37e2541891
Emit drain if it doesn't happen on its own in 100ms
2011-09-08 16:36:19 -07:00
indexzero
6a7fd14bfa
Add flow control
2011-09-08 16:29:15 -07:00
indexzero
ca1d12cf1b
[fix] Memory leak hunting.
2011-09-08 16:21:20 -07:00
indexzero
e1c41d0694
[fix] Add guards to every throw-able res.end call
2011-08-28 21:27:01 -04:00
indexzero
de4a6fe8a5
[fix] Only set x-forward-* headers if req.connection and req.connection.socket
2011-08-28 21:21:35 -04:00
indexzero
daf9231a66
[test fix] A few minor fixes to ensure basic WebSocket tests are working. Better scope tests by supported protocol
2011-08-28 05:06:14 -04:00
indexzero
d2b0e4399e
[api breaking] Begin refactor to optimize node-http-proxy by managing one instance of HttpProxy per host:port location
2011-08-28 03:38:39 -04:00