@marcel91200 / caddy Mirror · read-only / commits / e450a737
Fork 0

Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

Mirrored from https://github.com/Slazee/caddy.git

Synced Nov 13, 08:00 UTC

reverseproxy: Don't enable auto-https when `--from` flag is http (#5269)

Emily Lange committed Jan 6, 2023 at 21:42 UTC e450a7377b00f7f2a99042ba8e440fed69072028
1 file changed +4
modules/caddyhttp/reverseproxy/command.go
+4
@@ -172,6 +172,10 @@ func cmdReverseProxy(fs caddycmd.Flags) (int, error) {
172 Listen: []string{":" + fromAddr.Port},
173 }
174
175 + if fromAddr.Scheme == "http" {
176 + server.AutoHTTPS = &caddyhttp.AutoHTTPSConfig{Disabled: true}
177 + }
178 +
179 httpApp := caddyhttp.App{
180 Servers: map[string]*caddyhttp.Server{"proxy": server},
181 }