mirror of
https://github.com/caddyserver/caddy.git
synced 2026-10-08 05:55:22 +00:00
* reverseproxy: Add `handle_response` blocks to `reverse_proxy` (#3710) * reverseproxy: complete handle_response test * reverseproxy: Change handle_response matchers to use named matchers reverseproxy: Add support for changing status code * fastcgi: Remove obsolete TODO We already have d.Err("transport already specified") in the reverse_proxy parsing code which covers this case * reverseproxy: Fix support for "4xx" type status codes * Apply suggestions from code review Co-authored-by: Matt Holt <mholt@users.noreply.github.com> * caddyhttp: Reorganize response matchers * reverseproxy: Reintroduce caddyfile.Unmarshaler * reverseproxy: Add comment mentioning Finalize should be called Co-authored-by: Maxime Soulé <btik-git@scoubidou.com> Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
This commit is contained in:
parent
e6f6d3a476
commit
e4a22de9d1
10 changed files with 635 additions and 253 deletions
|
|
@ -353,12 +353,14 @@ func parsePHPFastCGI(h httpcaddyfile.Helper) ([]httpcaddyfile.ConfigValue, error
|
|||
|
||||
// the rest of the config is specified by the user
|
||||
// using the reverse_proxy directive syntax
|
||||
// TODO: this can overwrite our fcgiTransport that we encoded and
|
||||
// set on the rpHandler... even with a non-fastcgi transport!
|
||||
err = rpHandler.UnmarshalCaddyfile(dispenser)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
err = rpHandler.FinalizeUnmarshalCaddyfile(h)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// create the final reverse proxy route which is
|
||||
// conditional on matching PHP files
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue