mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 06:03:48 +03:00
reverseproxy: Don't enable auto-https when --from
flag is http (#5269)
This commit is contained in:
parent
d74f6fd967
commit
e450a7377b
1 changed files with 4 additions and 0 deletions
|
@ -172,6 +172,10 @@ func cmdReverseProxy(fs caddycmd.Flags) (int, error) {
|
||||||
Listen: []string{":" + fromAddr.Port},
|
Listen: []string{":" + fromAddr.Port},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if fromAddr.Scheme == "http" {
|
||||||
|
server.AutoHTTPS = &caddyhttp.AutoHTTPSConfig{Disabled: true}
|
||||||
|
}
|
||||||
|
|
||||||
httpApp := caddyhttp.App{
|
httpApp := caddyhttp.App{
|
||||||
Servers: map[string]*caddyhttp.Server{"proxy": server},
|
Servers: map[string]*caddyhttp.Server{"proxy": server},
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue