mirror of
https://github.com/caddyserver/caddy.git
synced 2025-02-17 23:45:41 -05:00
reverseproxy: Don't forget to provision embedded headers handler
https://caddy.community/t/set-cookie-manipulation-in-reverse-proxy/7666?u=matt
This commit is contained in:
parent
026937fab5
commit
1b061815b2
1 changed files with 10 additions and 0 deletions
|
@ -135,6 +135,16 @@ func (h *Handler) Provision(ctx caddy.Context) error {
|
||||||
h.CB = mod.(CircuitBreaker)
|
h.CB = mod.(CircuitBreaker)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ensure any embedded headers handler module gets provisioned
|
||||||
|
// (see https://caddy.community/t/set-cookie-manipulation-in-reverse-proxy/7666?u=matt
|
||||||
|
// for what happens if we forget to provision it)
|
||||||
|
if h.Headers != nil {
|
||||||
|
err := h.Headers.Provision(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("provisioning embedded headers handler: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// set up transport
|
// set up transport
|
||||||
if h.Transport == nil {
|
if h.Transport == nil {
|
||||||
t := &HTTPTransport{
|
t := &HTTPTransport{
|
||||||
|
|
Loading…
Add table
Reference in a new issue