diff options
Diffstat (limited to 'caddyconfig/httpcaddyfile/httptype.go')
| -rw-r--r-- | caddyconfig/httpcaddyfile/httptype.go | 11 | 
1 files changed, 6 insertions, 5 deletions
| diff --git a/caddyconfig/httpcaddyfile/httptype.go b/caddyconfig/httpcaddyfile/httptype.go index 3a54c08..d7716a4 100644 --- a/caddyconfig/httpcaddyfile/httptype.go +++ b/caddyconfig/httpcaddyfile/httptype.go @@ -446,13 +446,14 @@ func (st *ServerType) serversFromPairings(  		// handle the auto_https global option  		if autoHTTPS != "on" {  			srv.AutoHTTPS = new(caddyhttp.AutoHTTPSConfig) -			if autoHTTPS == "off" { +			switch autoHTTPS { +			case "off":  				srv.AutoHTTPS.Disabled = true -			} -			if autoHTTPS == "disable_redirects" { +			case "disable_redirects":  				srv.AutoHTTPS.DisableRedir = true -			} -			if autoHTTPS == "ignore_loaded_certs" { +			case "disable_certs": +				srv.AutoHTTPS.DisableCerts = true +			case "ignore_loaded_certs":  				srv.AutoHTTPS.IgnoreLoadedCerts = true  			}  		} | 
