Improved error message when TLS config is specified, but listen/redirect URL are using wrong scheme

This commit is contained in:
abrand 2016-06-03 20:02:30 -04:00
parent 6f98dfeb96
commit 51659716e0

View file

@ -80,7 +80,7 @@ func main() {
useTLS := *keyFile != "" && *certFile != "" useTLS := *keyFile != "" && *certFile != ""
if useTLS && (redirectURLParsed.Scheme != "https" || l.Scheme != "https") { if useTLS && (redirectURLParsed.Scheme != "https" || l.Scheme != "https") {
log.Fatalf("TLS Cert File and Key File were provided. Ensure the listen and redirect URL are using HTTPS.") log.Fatalf(`TLS Cert File and Key File were provided. Ensure listen and redirect URLs are using the "https://" scheme.`)
} }
cc := oidc.ClientCredentials{ cc := oidc.ClientCredentials{