Fix HTTP to HTTPS redirect without subdomains (#180)

This commit is contained in:
RytoEX 2020-10-15 12:29:16 -04:00 committed by GitHub
parent 2b8fde7917
commit 5daf54ebde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -346,6 +346,8 @@ export default (domain, domains, global) => {
if (domain.server.wwwSubdomain.computed && !domain.server.redirectSubdomains.computed) {
config.push(['server', httpRedirectConfig(domain, global, domain.server.domain.computed, `www.${domain.server.domain.computed}`)]);
config.push(['server', httpRedirectConfig(domain, global, `www.${domain.server.domain.computed}`)]);
} else if (!domain.server.wwwSubdomain.computed && !domain.server.redirectSubdomains.computed) {
config.push(['server', httpRedirectConfig(domain, global, domain.server.domain.computed)]);
}
if (domain.server.cdnSubdomain.computed) {
config.push(['server', httpRedirectConfig(domain, global, `cdn.${domain.server.domain.computed}`)]);