Browse Source
reverseproxy: Add `buffer_requests` option to `reverse_proxy` directive (#3710)
master
Francis Lavoie
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
0 deletions
-
caddytest/integration/caddyfile_adapt/reverse_proxy_h2c.txt
-
modules/caddyhttp/reverseproxy/caddyfile.go
|
|
@ -10,6 +10,7 @@ https://example.com { |
|
|
|
versions h2c 2 |
|
|
|
compression off |
|
|
|
} |
|
|
|
buffer_requests |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -38,6 +39,7 @@ https://example.com { |
|
|
|
{ |
|
|
|
"handle": [ |
|
|
|
{ |
|
|
|
"buffer_requests": true, |
|
|
|
"handler": "reverse_proxy", |
|
|
|
"headers": { |
|
|
|
"request": { |
|
|
|
|
|
@ -467,6 +467,12 @@ func (h *Handler) UnmarshalCaddyfile(d *caddyfile.Dispenser) error { |
|
|
|
h.FlushInterval = caddy.Duration(dur) |
|
|
|
} |
|
|
|
|
|
|
|
case "buffer_requests": |
|
|
|
if d.NextArg() { |
|
|
|
return d.ArgErr() |
|
|
|
} |
|
|
|
h.BufferRequests = true |
|
|
|
|
|
|
|
case "header_up": |
|
|
|
if h.Headers == nil { |
|
|
|
h.Headers = new(headers.Handler) |
|
|
|