From daf22b7f153a2a92d6b060e643f982f0213e78c7 Mon Sep 17 00:00:00 2001 From: Fu Diwei Date: Wed, 28 May 2025 16:44:11 +0800 Subject: [PATCH] feat: initialize aliyun fc ssl protocol --- internal/pkg/core/deployer/providers/aliyun-fc/aliyun_fc.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/pkg/core/deployer/providers/aliyun-fc/aliyun_fc.go b/internal/pkg/core/deployer/providers/aliyun-fc/aliyun_fc.go index c1e8c5a0..d86998d0 100644 --- a/internal/pkg/core/deployer/providers/aliyun-fc/aliyun_fc.go +++ b/internal/pkg/core/deployer/providers/aliyun-fc/aliyun_fc.go @@ -111,6 +111,9 @@ func (d *DeployerProvider) deployToFC3(ctx context.Context, certPEM string, priv TlsConfig: getCustomDomainResp.Body.TlsConfig, }, } + if tea.StringValue(updateCustomDomainReq.Body.Protocol) == "HTTP" { + updateCustomDomainReq.Body.Protocol = tea.String("HTTP,HTTPS") + } updateCustomDomainResp, err := d.sdkClients.FC3.UpdateCustomDomain(tea.String(d.config.Domain), updateCustomDomainReq) d.logger.Debug("sdk request 'fc.UpdateCustomDomain'", slog.Any("request", updateCustomDomainReq), slog.Any("response", updateCustomDomainResp)) if err != nil { @@ -140,6 +143,9 @@ func (d *DeployerProvider) deployToFC2(ctx context.Context, certPEM string, priv Protocol: getCustomDomainResp.Body.Protocol, TlsConfig: getCustomDomainResp.Body.TlsConfig, } + if tea.StringValue(updateCustomDomainReq.Protocol) == "HTTP" { + updateCustomDomainReq.Protocol = tea.String("HTTP,HTTPS") + } updateCustomDomainResp, err := d.sdkClients.FC2.UpdateCustomDomain(tea.String(d.config.Domain), updateCustomDomainReq) d.logger.Debug("sdk request 'fc.UpdateCustomDomain'", slog.Any("request", updateCustomDomainReq), slog.Any("response", updateCustomDomainResp)) if err != nil {