diff --git a/backend/app/service/website.go b/backend/app/service/website.go index 9c6bb2738..f522d4d61 100644 --- a/backend/app/service/website.go +++ b/backend/app/service/website.go @@ -682,20 +682,11 @@ func (w WebsiteService) OpWebsiteHTTPS(ctx context.Context, req request.WebsiteH websiteSSL.StartDate = cert.NotBefore websiteSSL.Type = cert.Issuer.CommonName websiteSSL.Organization = cert.Issuer.Organization[0] - websiteSSL.PrimaryDomain = cert.Subject.CommonName - if len(cert.Subject.Names) > 0 { - var domains []string - for _, name := range cert.Subject.Names { - if v, ok := name.Value.(string); ok { - if v != cert.Subject.CommonName { - domains = append(domains, v) - } - } - } - if len(domains) > 0 { - websiteSSL.Domains = strings.Join(domains, "") - } + if len(cert.DNSNames) > 0 { + websiteSSL.PrimaryDomain = cert.DNSNames[0] + websiteSSL.Domains = strings.Join(cert.DNSNames, ",") } + websiteSSL.Provider = constant.Manual websiteSSL.PrivateKey = req.PrivateKey websiteSSL.Pem = req.Certificate diff --git a/cmd/server/nginx_conf/ssl.conf b/cmd/server/nginx_conf/ssl.conf index 35ad743ab..12e2e97a3 100644 --- a/cmd/server/nginx_conf/ssl.conf +++ b/cmd/server/nginx_conf/ssl.conf @@ -5,7 +5,6 @@ ssl_ciphers EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AE ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; ssl_session_timeout 10m; -ssl_reject_handshake on; add_header Strict-Transport-Security "max-age=31536000"; error_page 497 https://$host$request_uri; proxy_set_header X-Forwarded-Proto https; diff --git a/frontend/src/views/website/ssl/index.vue b/frontend/src/views/website/ssl/index.vue index d0d134913..787e6a230 100644 --- a/frontend/src/views/website/ssl/index.vue +++ b/frontend/src/views/website/ssl/index.vue @@ -48,7 +48,7 @@ :label="$t('website.brand')" fix show-overflow-tooltip - prop="type" + prop="organization" >