|
|
@ -53,7 +53,7 @@ func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error) |
|
|
|
// UnmarshalCaddyfile sets up the handler from Caddyfile tokens. Syntax:
|
|
|
|
//
|
|
|
|
// reverse_proxy [<matcher>] [<upstreams...>] {
|
|
|
|
// # upstreams
|
|
|
|
// # backends
|
|
|
|
// to <upstreams...>
|
|
|
|
// dynamic <name> [...]
|
|
|
|
//
|
|
|
@ -74,15 +74,17 @@ func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error) |
|
|
|
// }
|
|
|
|
//
|
|
|
|
// # passive health checking
|
|
|
|
// max_fails <num>
|
|
|
|
// fail_duration <duration>
|
|
|
|
// max_conns <num>
|
|
|
|
// max_fails <num>
|
|
|
|
// unhealthy_status <status>
|
|
|
|
// unhealthy_latency <duration>
|
|
|
|
// unhealthy_request_count <num>
|
|
|
|
//
|
|
|
|
// # streaming
|
|
|
|
// flush_interval <duration>
|
|
|
|
// buffer_requests
|
|
|
|
// buffer_responses
|
|
|
|
// max_buffer_size <size>
|
|
|
|
//
|
|
|
|
// # header manipulation
|
|
|
|
// trusted_proxies [private_ranges] <ranges...>
|
|
|
@ -94,14 +96,23 @@ func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error) |
|
|
|
// ...
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// # intercepting responses
|
|
|
|
// # optionally intercept responses from upstream
|
|
|
|
// @name {
|
|
|
|
// status <code...>
|
|
|
|
// header <field> [<value>]
|
|
|
|
// }
|
|
|
|
// replace_status <matcher> <status_code>
|
|
|
|
// replace_status [<matcher>] <status_code>
|
|
|
|
// handle_response [<matcher>] {
|
|
|
|
// <directives...>
|
|
|
|
//
|
|
|
|
// # special directives only available in handle_response
|
|
|
|
// copy_response [<matcher>] [<status>] {
|
|
|
|
// status <status>
|
|
|
|
// }
|
|
|
|
// copy_response_headers [<matcher>] {
|
|
|
|
// include <fields...>
|
|
|
|
// exclude <fields...>
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
//
|
|
|
@ -1073,6 +1084,7 @@ func parseCopyResponseHeadersCaddyfile(h httpcaddyfile.Helper) (caddyhttp.Middle |
|
|
|
// UnmarshalCaddyfile sets up the handler from Caddyfile tokens. Syntax:
|
|
|
|
//
|
|
|
|
// copy_response_headers [<matcher>] {
|
|
|
|
// include <fields...>
|
|
|
|
// exclude <fields...>
|
|
|
|
// }
|
|
|
|
//
|
|
|
|