Browse Source

fix(webforwarding): 修复 HTTP/HTTPS 协议下数据来源获取错误

- 将 HttpJSON 和 HttpsJSON 数据来源的获取逻辑进行了修正
- 确保在处理 HTTP 和 HTTPS 请求时,能够正确地获取相应的数据来源
fusu 1 month ago
parent
commit
9b2440df43
1 changed files with 2 additions and 2 deletions
  1. 2 2
      internal/service/webforwarding.go

+ 2 - 2
internal/service/webforwarding.go

@@ -465,10 +465,10 @@ func (s *webForwardingService) EditWebForwarding(ctx context.Context, req *v1.We
 		var typeJson []byte
 		var apiType string
 		if req.WebForwardingData.IsHttps == isHttps {
-			typeJson = formData.HttpJSON
+			typeJson = formData.HttpsJSON
 			apiType = protocolHttps
 		}else {
-			typeJson = formData.HttpsJSON
+			typeJson = formData.HttpJSON
 			apiType = protocolHttp
 		}
 		err = s.cdn.EditServerType(ctx, v1.EditWebsite{