Merge pull request #9 from belst/main

fix config options
This commit is contained in:
Mechiel Lukkien 2023-02-26 20:45:10 +01:00 committed by GitHub
commit 7e56ed9e8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,7 +76,7 @@ func ListenAndServe() {
srv.mux.HandleFunc("/", safeHeaders(accountHandle))
}
if l.AccountHTTPS.Enabled {
srv := ensureServe(true, config.Port(l.AccountHTTP.Port, 443), "account-https")
srv := ensureServe(true, config.Port(l.AccountHTTPS.Port, 443), "account-https")
srv.mux.HandleFunc("/", safeHeaders(accountHandle))
}
@ -89,7 +89,7 @@ func ListenAndServe() {
}
if l.AdminHTTPS.Enabled {
srv := ensureServe(true, config.Port(l.AdminHTTPS.Port, 443), "admin-https")
if !l.AccountHTTP.Enabled {
if !l.AccountHTTPS.Enabled {
srv.mux.HandleFunc("/", safeHeaders(adminIndex))
}
srv.mux.HandleFunc("/admin/", safeHeaders(adminHandle))