only check if both baseDomain & tenantName are not empty
@@ -118,6 +118,7 @@ func (h *ApiHandler) handleUpdateRoute(c echo.Context) (err error) {
baseDomain := h.ClusterBaseDomain
tenantName := currentUser.Tenant
+ if baseDomain != "" && tenantName != "" {
ok, idxList := v1alpha1.IsHttpRouteSpecValidIfUsingKalmDomain(baseDomain, tenantName, *route.HttpRouteSpec)
if !ok {
var invalidHosts []string
@@ -128,6 +129,7 @@ func (h *ApiHandler) handleUpdateRoute(c echo.Context) (err error) {
return fmt.Errorf("invalid usage of kalmDomain, invalid hosts: %s", invalidHosts)
}
}
+ }
if route, err = h.resourceManager.UpdateHttpRoute(route); err != nil {
return err
