修复自定义页面无法保存的问题

This commit is contained in:
GoEdgeLab
2023-07-31 09:46:00 +08:00
parent 2da3b6c1ca
commit f5af43fd51

View File

@@ -369,7 +369,7 @@ func (this *HTTPWebService) UpdateHTTPWebShutdown(ctx context.Context, req *pb.U
if len(shutdownConfig.URL) > maxURLLength {
return nil, errors.New("'url' too long")
}
if !regexputils.HTTPProtocol.MatchString(shutdownConfig.URL) {
if shutdownConfig.IsOn /** validate when it's on **/ && !regexputils.HTTPProtocol.MatchString(shutdownConfig.URL) {
return nil, errors.New("invalid 'url' format")
}