|
@@ -457,15 +457,17 @@ func (s *webForwardingService) EditWebForwarding(ctx context.Context, req *v1.We
|
|
|
var typeJson []byte
|
|
|
var closeJson []byte
|
|
|
var apiType string
|
|
|
+ var closeType string
|
|
|
if req.WebForwardingData.IsHttps == isHttps {
|
|
|
typeJson = formData.HttpsJSON
|
|
|
closeJson = formData.HttpJSON
|
|
|
apiType = protocolHttps
|
|
|
+ closeType = protocolHttp
|
|
|
} else {
|
|
|
typeJson = formData.HttpJSON
|
|
|
closeJson = formData.HttpsJSON
|
|
|
apiType = protocolHttp
|
|
|
-
|
|
|
+ closeType = protocolHttps
|
|
|
}
|
|
|
err = s.cdn.EditServerType(ctx, v1.EditWebsite{
|
|
|
Id: int64(oldData.CdnWebId),
|
|
@@ -477,7 +479,7 @@ func (s *webForwardingService) EditWebForwarding(ctx context.Context, req *v1.We
|
|
|
err = s.cdn.EditServerType(ctx, v1.EditWebsite{
|
|
|
Id: int64(oldData.CdnWebId),
|
|
|
TypeJSON: closeJson,
|
|
|
- }, protocolHttp)
|
|
|
+ }, closeType)
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|