Skip to content

Commit

Permalink
reverseproxy: Add buffer_requests option to reverse_proxy directi…
Browse files Browse the repository at this point in the history
…ve (#3710)
  • Loading branch information
francislavoie authored Sep 8, 2020
1 parent 24f3478 commit 4cd7ae3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions caddytest/integration/caddyfile_adapt/reverse_proxy_h2c.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ https://example.com {
versions h2c 2
compression off
}
buffer_requests
}
}

Expand Down Expand Up @@ -38,6 +39,7 @@ https://example.com {
{
"handle": [
{
"buffer_requests": true,
"handler": "reverse_proxy",
"headers": {
"request": {
Expand Down
6 changes: 6 additions & 0 deletions modules/caddyhttp/reverseproxy/caddyfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4cd7ae3

Please sign in to comment.