reverseproxy: Add buffer_requests option to reverse_proxy directive (#3710)

This commit is contained in:
Francis Lavoie 2020-09-08 12:37:46 -04:00 committed by GitHub
parent 24f34780b6
commit 4cd7ae35b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -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": {

View file

@ -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)