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
f23d8cb37f
Add {upstream} placeholder when proxy middleware is used ( closes #531 )
...
Middlewares can now make their own placeholders that may be useful in
logging, on a per-request basis. Proxy is the first one to do this.
2016-03-20 21:56:13 -06:00
Abiola Ibrahim
e7001e6538
Add except
to FastCGI. Minor refactor in proxy.
2016-03-20 08:02:17 +01:00
Pieter Raubenheimer
a7766c9033
Add common method for checking host availability
2016-03-10 14:42:19 +00:00
eiszfuchs
7091a2090b
created http.Transport and tests for unix sockets
2016-02-10 19:45:31 +01:00
Matthew Holt
82b049229b
proxy: Add basic proxying test and InsecureSkipVerify transport test
2016-01-23 10:14:13 -07:00
Abiola Ibrahim
7949388da8
Proxy: Allow ignored subpaths.
2015-11-16 17:22:06 +01:00
Matthew Holt
6cbd3ab096
proxy: 64-bit word alignment for 32-bit systems ( fixes #252 )
2015-09-22 16:47:39 -06:00
Matthew Holt
04571ff393
NewReplacer takes third argument for empty value string
2015-07-24 10:27:19 -06:00
Zac Bergquist
41e1f1ffa5
Update error strings (start with lowercase letters)
2015-06-07 20:49:17 -04: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
Zac Bergquist
506f131428
Fix lint warnings for middleware/proxy
2015-05-24 20:58:17 -04:00
Nimi Wariboko Jr
0ed5b364c6
Refactor proxy middleware so that 1.) From() is exposed 2.) Other upstreams can be implemented/plugged in
2015-05-04 19:58:18 -07:00
Matthew Holt
6029973bdc
Major refactoring of middleware and parser in progress
2015-05-04 11:04:37 -06:00
Nimi Wariboko Jr
264e5b7911
Use the provided Replacer tools in order to proxy string interpolation.
2015-05-03 13:33:08 -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
Matthew Holt
d8e7adcdb4
Refactored proxy middleware
2015-04-11 17:24:47 -06:00
Matthew Holt
d33256f1dc
Refactor: Middleware chain uses Handler instead of HandlerFunc
2015-04-02 23:30:54 -06:00
Matthew Holt
9f793dad28
Proxy destination may include scheme
2015-03-31 23:53:39 -06:00
Matthew Holt
6bf36d922c
Refactored proxy middleware to return errors
2015-03-28 16:56:56 -06:00
Matthew Holt
0e43271cc9
Basic proxy feature works
2015-02-02 23:41:35 -07:00
Matthew Holt
ae2a2d5b00
Godoc for middleware packages and server package
2015-01-29 23:52:18 -07:00
Matthew Holt
13cf980879
Moved proxy middleware into its own package
2015-01-29 22:05:36 -07:00