Jarrett Cruger
ea0a4ded80
[fix] style spacing wtf
2014-12-17 00:53:51 -07:00
Jarrett Cruger
95a588706b
Merge pull request #741 from samccone/sjs/redirect-host-rewrite
...
Allow optional redirect host rewriting.
2014-11-25 17:08:54 -05:00
Mike Pennisi
8a24a1e18f
Set Content-Length header for OPTIONS requests
...
Web browsers automatically issue an OPTIONS request in advance of other
HTTP requests when the document's domain does not match the target in
order to facilitate Cross-Origin Resource Sharing. These requests are
forbidden from specifying a body and typically do not specify an
(unecessary) `Length` header.
Node.js automatically adds the `Content-Encoding: chunked` header value
to requests that do not specify a `Length` header. This makes proxied
OPTIONS requests from web browsers invalid.
Explicitly set the `Content-Length` header of all `OPTIONS` requests to
"0", disabling the default "chunked" encoding behavior [2].
[1] http://www.w3.org/TR/cors/
[2] http://nodejs.org/api/http.html
2014-11-24 17:14:48 -05:00
Sam Saccone
daf66a7a88
Allow optional redirect host rewriting.
2014-11-23 19:22:07 -05:00
jleal52
9ba8311343
Updated to support error callback on proxy.web and start/proxyReq/end continue working.
2014-11-12 14:41:46 +00:00
Manu Sporny
db5f2954b2
[api] Add event-based ability to modify pre-flight proxy requests.
2014-07-18 11:46:04 -04:00
Jarrett Cruger
d1baa3684e
[api] also emit the target on a proxy error
2014-07-08 16:12:57 -04:00
Damian Kaczmarek
7b79a7409a
Change name targetTimeout to proxyTimeout
2014-06-10 19:04:12 +02:00
Damian Kaczmarek
0f243516e1
Added targetTimeout option and two tests for timeout
2014-06-10 01:35:53 +02:00
Bryce Gibson
1213e46b1b
Add the req and res objects to the proxyRes event
2014-05-12 08:22:54 +10:00
Jarrett Cruger
77a1cff9bc
[fix] handle error on incoming request as well and properly abort proxy if client request is aborted
2014-04-14 13:08:10 -04:00
Jarrett Cruger
4f07dc220d
[fix] let user make the decision on what to do with the buffer
2014-04-10 20:02:46 -04:00
Jarrett Cruger
8b48a9fdab
[api] emit a start an an end event
2014-04-09 13:38:13 -04:00
yawnt
e936d186b6
[fix] closes #555
2014-01-19 11:49:26 +01:00
Mike Moulton
969a623542
Only emit response if a valid server is present
2014-01-14 00:45:42 -07:00
yawnt
97e4600e94
[fix] fixes #341
2013-12-18 12:33:23 +01:00
yawnt
961d2f9400
[fix] support target and forward
2013-11-08 20:56:26 +01:00
yawnt
590bb604da
[fix] _ because it is unused
2013-11-07 19:00:01 +01:00
yawnt
dda6f7a45a
[feature] add emit proxyRes
2013-11-05 17:44:04 +01:00
yawnt
1204a35e46
[fix] support buffer
2013-10-29 18:12:23 +01:00
yawnt
e3f8d5fdbe
[feature] add buffer support
2013-10-26 17:20:30 +02:00
cronopio
cc09ae6a34
[fix] use the correct arguments order
2013-10-21 21:19:52 -05:00
mmoulton
0bfb9be418
Fixed issue where error callback would not invoke, including new test cases. Added req/res values to error events.
...
Conflicts:
lib/http-proxy/passes/web-incoming.js
2013-10-21 17:36:20 -05:00
cronopio
babdf531fe
Revert "[fix] fixed options and server reference to can access them from passes functions"
...
This reverts commit 90fb01d38ac5af7ef395547b24e985b6f63b4abc.
2013-10-21 14:45:03 -05:00
cronopio
2bf20d61d5
Revert "[tests] fix test to use the new way to pass options"
...
This reverts commit 52ecd52ee5aa78603e44ba8d5ff9187410351622.
2013-10-21 14:44:49 -05:00
cronopio
52ecd52ee5
[tests] fix test to use the new way to pass options
2013-10-21 03:59:14 -05:00
cronopio
90fb01d38a
[fix] fixed options and server reference to can access them from passes functions
2013-10-21 03:26:54 -05:00
yawnt
c7924e01f9
[fix] callback as optional error handler
2013-10-09 17:23:44 +02:00
yawnt
601dbcbfe9
[fix] refactor error handling
2013-10-09 16:59:03 +02:00
indexzero
bb0d28c587
[refactor minor] s/caronte/http-proxy/ or s/caronte/httpProxy/ where appropriate.
2013-09-26 03:37:08 -04:00