957 Commits

Author SHA1 Message Date
Jarrett Cruger
48ae5d828c [minor] style consistency 2014-11-25 17:21:24 -05: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
Jarrett Cruger
3194d819b4 Merge pull request #742 from jugglinmike/option-content-length
Set `Content-Length` header for OPTIONS requests
2014-11-25 11:15:46 -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
add81338a9 📝 Add host rewrite docs and specs. 2014-11-23 19:22:07 -05:00
Sam Saccone
daf66a7a88 Allow optional redirect host rewriting. 2014-11-23 19:22:07 -05:00
Jarrett Cruger
aba505d159 Merge pull request #736 from richardkazuomiller/copy-headers
copy headers instead of referencing them so they don't unexpectedly get overwritten
2014-11-12 16:46:51 -05:00
Ricky Miller
84036e9ddd style changes 2014-11-13 06:05:32 +09:00
Ricky Miller
daa2ce0ee3 copy headers instead of referencing them so they don't unexpectedly get overwritten 2014-11-13 04:37:45 +09:00
Jarrett Cruger
69a693034e Merge pull request #735 from jleal52/master
Updated to support error callback on proxy.web and start/proxyReq/end co...
2014-11-12 13:05:04 -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
Jarrett Cruger
709b3e9656 [dist] Version bump. 1.6.2 v1.6.2 2014-11-11 11:47:43 -05:00
Jarrett Cruger
3f19e6e178 [minor] this shouldnt be in var block 2014-11-11 11:47:15 -05:00
Jarrett Cruger
7c5e40a429 [fix] style changes 2014-11-10 23:02:43 -05:00
Jarrett Cruger
eb95660822 Merge pull request #733 from richardkazuomiller/double-slash-fix
do not modify the query string
2014-11-10 22:29:16 -05:00
Ricky Miller
4a2b870cc9 do not modify the query string 2014-11-09 08:44:22 +09:00
Jarrett Cruger
fa797fca90 [dist] Version bump. 1.6.1 v1.6.1 2014-11-04 18:14:09 -05:00
Jarrett Cruger
57329b6327 Merge pull request #729 from lightblade/master
websocket needs to respect `options.secure` too
2014-11-04 18:13:26 -05:00
Ming Liu
d1eabccf93 websocket needs to respect options.secure too 2014-11-04 15:06:45 -08:00
Jarrett Cruger
60bd697051 Merge pull request #724 from whitecolor/change-origin-option
changeOrigin option docs fix
2014-10-29 10:52:10 -04:00
Alex Oshchepkov
1af8224cc1 changeOrigin option docs fix 2014-10-29 08:09:43 +05:00
Jarrett Cruger
43641b00b3 [dist] Version bump. 1.6.0 v1.6.0 2014-10-28 22:53:54 -04:00
Jarrett Cruger
70fa8ad58c Merge pull request #723 from whitecolor/change-origin-option
Added changeOrigin option with test and docs
2014-10-28 22:52:50 -04:00
Alex Oshchepkov
796ab0bcc5 Added changeOrigin option with test and docs 2014-10-29 07:25:19 +05:00
Charlie Robbins
f70015f001 Merge pull request #717 from waded/patch-1
I presume you mean couchdb here
2014-10-15 01:35:41 -04:00
Wade Dorrell
f64954a08b I presume you mean couchdb here 2014-10-14 22:49:33 -06:00
Jarrett Cruger
3768cce4ca Merge pull request #712 from zhudan/master
update modify request body eg
2014-10-09 09:48:08 -04:00
dan
d46e876e27 update modify request body eg 2014-10-09 14:33:04 +08:00
dan
0378b03e53 update modify request body eg 2014-10-09 14:32:52 +08:00
dan
04c45a022c update modify request body eg 2014-10-09 14:30:11 +08:00
Jarrett Cruger
9577a0faf2 [dist] Version bump. 1.5.3 v1.5.3 2014-10-01 07:10:51 -04:00
Jarrett Cruger
fcdbf46e4d Merge pull request #709 from minrk/close-on-error
close socket if upstream request fails
2014-10-01 07:10:22 -04:00
MinRK
c62766391e close socket if upstream request fails
adds socket.end() to on('error') handlers for proxyReq and proxySocket
2014-09-30 19:58:57 -07:00
Jarrett Cruger
43c6f0c7c0 [dist] Version bump. 1.5.2 v1.5.2 2014-09-30 21:21:04 -04:00
Jarrett Cruger
b065d92908 Merge pull request #708 from minrk/close-closes
close websocket if proxyReq is closed before upgrade
2014-09-30 20:55:38 -04:00
MinRK
bcd8a564a8 close websocket if proxyReq is closed before upgrade
avoids leaving client sockets open when upstream
connections are rejected.
2014-09-30 17:01:20 -07:00
MinRK
77305489d9 test closing upstream socket prior to upgrade
should close the client socket with ECONNRESET,
but currently is left hanging.
2014-09-30 16:11:49 -07:00
Jarrett Cruger
f0bf741815 [dist] Version bump. 1.5.1 v1.5.1 2014-09-30 15:23:02 -04:00
Jarrett Cruger
10a294af4d [fix] do a check to make sure the server exists before we try and emit 2014-09-30 15:22:52 -04:00
Jarrett Cruger
232258b6ec [dist] Version bump. 1.5.0 v1.5.0 2014-09-29 22:38:47 -04:00
Jarrett Cruger
9210b56c9e Merge pull request #706 from thlorenz/expose-proxy-socket
exposing proxySocket on socket to support sniffing messages coming from proxy target
2014-09-29 22:34:06 -04:00
Thorsten Lorenz
000eb533de emitting proxySocket on proxyServer
- emitted once proxySocket was created and socket was piped into it
- needed to support sniffing messages coming from proxy target
2014-09-29 20:09:46 -04:00
Jarrett Cruger
2aa3b84d7b Merge pull request #705 from Jimbly/patch-1
Fixed misleading documentation
2014-09-26 00:01:36 -04:00
Jimb Esser
a4ca578b44 Fixed misleading documentation
options.xfwd definitely works fine without using the .listen method, and, AFAICT, .toProxy should as well.  Only .ssl and .ws are referenced in .listen.
2014-09-25 20:54:46 -07:00
Jarrett Cruger
e7d50b1a37 [minor] extra space 2014-09-25 22:11:12 -04:00
Jarrett Cruger
c0a796b3e3 [fix] perf optimization so we have a precompiled regexp 2014-09-17 07:53:18 -04:00
Jarrett Cruger
90d40d6a6a Merge pull request #702 from shebson/fix-readme-typo
Fix typo in README.md
2014-09-16 18:21:35 -04:00
Stephen Hebson
45cf95a82e Fix typo in README.md
"Is it then possible" -> "It is then possible"
2014-09-16 14:55:12 -07:00
Jarrett Cruger
42c35aedca Merge pull request #691 from minrk/firefox-ws-connection-close
handle 'upgrade' in comma-separated connection header
2014-09-16 15:42:41 -04:00
MinRK
ec683b924b test new detection of connection: upgrade 2014-09-16 12:09:26 -07:00