From 8fdc98cde9d37973e25bb8dfe4d44aa5c205fad3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Sat, 18 Nov 2023 10:39:32 +0800 Subject: [PATCH] =?UTF-8?q?CA=E8=AF=81=E4=B9=A6=E4=B9=9F=E6=94=AF=E6=8C=81?= =?UTF-8?q?IP=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/serverconfigs/sslconfigs/ssl_cert_config.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/serverconfigs/sslconfigs/ssl_cert_config.go b/pkg/serverconfigs/sslconfigs/ssl_cert_config.go index 169f6af..1687835 100644 --- a/pkg/serverconfigs/sslconfigs/ssl_cert_config.go +++ b/pkg/serverconfigs/sslconfigs/ssl_cert_config.go @@ -99,6 +99,16 @@ func (this *SSLCertConfig) Init(ctx context.Context) error { } } + for _, ipAddress := range c.IPAddresses { + if ipAddress == nil { + continue + } + var ipAddressString = ipAddress.String() + if !lists.ContainsString(dnsNames, ipAddressString) { + dnsNames = append(dnsNames, ipAddressString) + } + } + commonNames = append(commonNames, c.Issuer.CommonName) if index == 0 {