Updated tag filtering

- Added automatic empty tag removal when creating new proxy rule
This commit is contained in:
Toby Chui 2025-02-08 17:07:26 +08:00
parent 9b64278200
commit 693dba07b7

View File

@ -313,6 +313,14 @@ func ReverseProxyHandleAddEndpoint(w http.ResponseWriter, r *http.Request) {
tags[i] = strings.TrimSpace(tags[i])
}
}
// Remove empty tags
filteredTags := []string{}
for _, tag := range tags {
if tag != "" {
filteredTags = append(filteredTags, tag)
}
}
tags = filteredTags
var proxyEndpointCreated *dynamicproxy.ProxyEndpoint
if eptype == "host" {