Skip to content

Commit

Permalink
feat: 取消网站 ipv6 的默认设置 (#1099)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengkunwang223 authored and wanghe-fit2cloud committed May 22, 2023
1 parent 8533a71 commit 53756c3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
3 changes: 0 additions & 3 deletions backend/app/service/website_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,6 @@ func applySSL(website model.Website, websiteSSL model.WebsiteSSL, req request.We
config := nginxFull.SiteConfig.Config
server := config.FindServers()[0]
server.UpdateListen("443", website.DefaultServer, "ssl")
server.UpdateListen("[::]:443", website.DefaultServer, "ssl")

switch req.HttpConfig {
case constant.HTTPSOnly:
Expand All @@ -381,11 +380,9 @@ func applySSL(website model.Website, websiteSSL model.WebsiteSSL, req request.We
server.RemoveDirective("if", []string{"($scheme"})
case constant.HTTPToHTTPS:
server.UpdateListen("80", website.DefaultServer)
server.UpdateListen("[::]:80", website.DefaultServer)
server.AddHTTP2HTTPS()
case constant.HTTPAlso:
server.UpdateListen("80", website.DefaultServer)
server.UpdateListen("[::]:80", website.DefaultServer)
server.RemoveDirective("if", []string{"($scheme"})
}

Expand Down
2 changes: 0 additions & 2 deletions cmd/server/nginx_conf/website_default.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
server {
listen 80;
listen [::]:80;

server_name ko.wp-1.com;

index index.php index.html index.htm default.php default.htm default.html;
Expand Down

0 comments on commit 53756c3

Please sign in to comment.