mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-25 09:40:13 +08:00
reverseproxy: Don't enable auto-https when --from
flag is http (#5269)
This commit is contained in:
parent
d74f6fd967
commit
e450a7377b
|
@ -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 New Issue
Block a user