|
|
@ -372,7 +372,6 @@ func applySSL(website model.Website, websiteSSL model.WebsiteSSL, req request.We
|
|
|
|
config := nginxFull.SiteConfig.Config
|
|
|
|
config := nginxFull.SiteConfig.Config
|
|
|
|
server := config.FindServers()[0]
|
|
|
|
server := config.FindServers()[0]
|
|
|
|
server.UpdateListen("443", website.DefaultServer, "ssl")
|
|
|
|
server.UpdateListen("443", website.DefaultServer, "ssl")
|
|
|
|
server.UpdateListen("[::]:443", website.DefaultServer, "ssl")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch req.HttpConfig {
|
|
|
|
switch req.HttpConfig {
|
|
|
|
case constant.HTTPSOnly:
|
|
|
|
case constant.HTTPSOnly:
|
|
|
@ -381,11 +380,9 @@ func applySSL(website model.Website, websiteSSL model.WebsiteSSL, req request.We
|
|
|
|
server.RemoveDirective("if", []string{"($scheme"})
|
|
|
|
server.RemoveDirective("if", []string{"($scheme"})
|
|
|
|
case constant.HTTPToHTTPS:
|
|
|
|
case constant.HTTPToHTTPS:
|
|
|
|
server.UpdateListen("80", website.DefaultServer)
|
|
|
|
server.UpdateListen("80", website.DefaultServer)
|
|
|
|
server.UpdateListen("[::]:80", website.DefaultServer)
|
|
|
|
|
|
|
|
server.AddHTTP2HTTPS()
|
|
|
|
server.AddHTTP2HTTPS()
|
|
|
|
case constant.HTTPAlso:
|
|
|
|
case constant.HTTPAlso:
|
|
|
|
server.UpdateListen("80", website.DefaultServer)
|
|
|
|
server.UpdateListen("80", website.DefaultServer)
|
|
|
|
server.UpdateListen("[::]:80", website.DefaultServer)
|
|
|
|
|
|
|
|
server.RemoveDirective("if", []string{"($scheme"})
|
|
|
|
server.RemoveDirective("if", []string{"($scheme"})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|