Fix HTTP to HTTPS redirect without subdomains (#180)

pull/184/head
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
1 changed files with 2 additions and 0 deletions

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}`)]);