|
@@ -559,8 +559,14 @@ func (s *webForwardingService) EditWebForwarding(ctx context.Context, req *v1.We
|
|
|
}
|
|
|
|
|
|
// 验证端口重复
|
|
|
+ var protocol string
|
|
|
+ if req.WebForwardingData.IsHttps == isHttps {
|
|
|
+ protocol = "https"
|
|
|
+ }else{
|
|
|
+ protocol = "http"
|
|
|
+ }
|
|
|
if oldData.Port != req.WebForwardingData.Port {
|
|
|
- err = s.wafformatter.VerifyPort(ctx, "http", int64(req.WebForwardingData.Id), req.WebForwardingData.Port, int64(require.HostId), req.WebForwardingData.Domain)
|
|
|
+ err = s.wafformatter.VerifyPort(ctx, protocol, int64(req.WebForwardingData.Id), req.WebForwardingData.Port, int64(require.HostId), req.WebForwardingData.Domain)
|
|
|
if err != nil {
|
|
|
return err
|
|
|
}
|