|
@@ -229,7 +229,6 @@ func (s *aidedWebService) PrepareWafData(ctx context.Context, req *v1.WebForward
|
|
|
return RequireResponse{}, v1.Website{}, err // 错误信息在辅助函数中已经包装好了
|
|
|
}
|
|
|
|
|
|
- req.WebForwardingData.SslPolicyId = byteData.SslPolicyRef.SslPolicyId
|
|
|
|
|
|
type serverNames struct {
|
|
|
ServerNames string `json:"name" form:"name"`
|
|
@@ -309,6 +308,9 @@ func (s *aidedWebService) BuildProxyConfig(ctx context.Context, req *v1.WebForwa
|
|
|
return v1.TypeJSON{}, err
|
|
|
}
|
|
|
|
|
|
+ // 更新请求中的 SSL 策略
|
|
|
+ req.WebForwardingData.SslPolicyId = sslPolicy.SslPolicyId
|
|
|
+
|
|
|
// 第二步:根据协议类型确定 apiType
|
|
|
apiType := protocolHttp
|
|
|
if req.WebForwardingData.IsHttps == isHttps {
|
|
@@ -332,6 +334,8 @@ func (s *aidedWebService) BuildProxyConfig(ctx context.Context, req *v1.WebForwa
|
|
|
Listen: listenConfigs,
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
return jsonData, nil
|
|
|
}
|
|
|
|
|
@@ -490,7 +494,6 @@ func (s *aidedWebService) ProcessSSLCertificate(ctx context.Context, req *v1.Web
|
|
|
|
|
|
// 更新请求中的证书ID
|
|
|
req.WebForwardingData.SslCertId = sslCertId
|
|
|
- req.WebForwardingData.SslPolicyId = formData.HttpsJSON.SslPolicyRef.SslPolicyId
|
|
|
|
|
|
// 编辑SSL策略
|
|
|
if err := s.sslCert.EditSslPolicy(ctx, formData.HttpsJSON.SslPolicyRef.SslPolicyId, []int64{sslCertId}, "add"); err != nil {
|