diff --git a/pkg/cloudcommon/db/proxy/proxysetting.go b/pkg/cloudcommon/db/proxy/proxysetting.go index 900ab4e3a7..35e069b25c 100644 --- a/pkg/cloudcommon/db/proxy/proxysetting.go +++ b/pkg/cloudcommon/db/proxy/proxysetting.go @@ -74,6 +74,9 @@ func (ps *SProxySetting) HttpTransportProxyFunc() httputils.TransportProxyFunc { } func (ps *SProxySetting) ValidateDeleteCondition(ctx context.Context) error { + if ps.Id == proxyapi.ProxySettingId_DIRECT { + return httperrors.NewConflictError("DIRECT setting cannot be deleted") + } for _, man := range referrersMen { t := man.TableSpec().Instance() n, err := t.Query().