Fix logic error with http redirects

This commit is contained in:
Tobie Morgan Hitchcock 2017-11-23 14:34:32 +00:00
parent 7bfcf8b7f8
commit 26e5ef3978

View file

@ -92,7 +92,7 @@ func Setup(opts *cnf.Options) (err error) {
// Redirect non-https // Redirect non-https
s.Use(mw.Secure(&mw.SecureOpts{ s.Use(mw.Secure(&mw.SecureOpts{
RedirectHTTP: len(opts.Cert.Crt) == 0 || len(opts.Cert.Key) == 0, RedirectHTTP: len(opts.Cert.Crt) != 0 || len(opts.Cert.Key) != 0,
})) }))
// Log successful start // Log successful start