Matt Holt
81e26970a3
proxy: Move handling of headers around to prevent memory usage spikes ( #784 )
...
* Move handling of headers around to prevent memory use spikes
While debugging #782 , I noticed that using http2 and max_fails=0,
X-Forwarded-For grew infinitely when an upstream request failed after
refreshing the test page. This change ensures that headers are only
set once per request rather than appending in a time-terminated loop.
* Refactor some code into its own function
2016-04-27 12:50:18 -06:00
Matthew Holt
3faad41b43
middleware: ResponseRecorder now is an http.Flusher ( fixes #677 )
...
Flush every 250ms. This should keep latency somewhat low but there is
still buffering; maybe in the future we can make this configurable.
2016-04-09 00:17:15 -06:00
Ruben Callewaert
1a9f700287
Allow mixed case Upgrade headers
...
Caddy expects websocket to be completely lowercase.
Some applications send websocket upgrade headers like the following:
`Upgrade: WebSocket`
This change allows all variations of websocket.
2016-04-03 17:48:53 +02:00
eiszfuchs
cbd9b814b9
fixed req.URL.Path for unix: sockets
2016-03-28 22:18:14 +02:00
eiszfuchs
7091a2090b
created http.Transport and tests for unix sockets
2016-02-10 19:45:31 +01:00
Matthew Holt
9e900b0a08
godoc
2016-01-25 20:45:23 -07:00
Filippo Valsorda
bae4ac9764
proxy: add a insecure_skip_verify option - closes #320
2016-01-23 03:26:31 +00:00
Luit van Drongelen
1fb66d534a
Close proxy's backend request earlier when re-connecting for websocket
2015-11-21 20:03:46 +01:00
Luit van Drongelen
f0b1edaf8c
Fix proxy for websocket with altered Host header
2015-11-21 20:00:44 +01:00
Viacheslav Biriukov
593557659c
fix tests and change naming
2015-06-04 13:57:39 +00:00
Viacheslav Biriukov
4790dacbf7
add without to proxy middleware
2015-06-03 18:06:24 +00:00
Matthew Holt
9ce0e8e17c
proxy: Added tests for reverse websocket proxy
2015-06-01 22:39:53 -06:00
Austin
68cd4bdeab
check server response instead of client
2015-06-01 19:29:32 -07:00
Austin
ccd3e55b32
changes as noted in PR
2015-06-01 10:23:57 -07:00
Austin
56ec7b9887
websocket directive, upgrade comparison
2015-05-30 11:34:54 -07:00
Austin
2d6ff40649
add supported for ws in reverse proxy
2015-05-29 19:21:50 -07:00
Nimi Wariboko Jr
4a4b80450a
Upgrade proxy middleware. Add support for: multiple backends, load balancing, health checks, and pluggable backends
2015-05-02 22:45:01 -07:00