Only override TLS settings if scheme is specified

This commit is contained in:
AudriusButkevicius 2015-12-18 19:42:39 +00:00
parent 2cdfa59fbe
commit 33a87f54bb

View File

@ -44,7 +44,7 @@ func (c GUIConfiguration) Address() string {
}
func (c GUIConfiguration) UseTLS() bool {
if override := os.Getenv("STGUIADDRESS"); override != "" {
if override := os.Getenv("STGUIADDRESS"); override != "" && strings.HasPrefix(override, "http") {
return strings.HasPrefix(override, "https:")
}
return c.RawUseTLS