From b592fc823933e1476af2c3612b250ca6d5989086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vincent=20Tenc=C3=A9?= Date: Tue, 20 Aug 2024 09:32:15 -0400 Subject: [PATCH] feat: allow `.` in proxy path escape pattern Add the `.` character to the proxy path escape pattern so that we can use e.g. domain names as cluster names without breaking the query parameters escaping. See https://github.com/oam-dev/cluster-gateway/issues/150 --- pkg/apis/cluster/v1alpha1/clustergateway_proxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/apis/cluster/v1alpha1/clustergateway_proxy.go b/pkg/apis/cluster/v1alpha1/clustergateway_proxy.go index 0c5786ae..67662dc4 100644 --- a/pkg/apis/cluster/v1alpha1/clustergateway_proxy.go +++ b/pkg/apis/cluster/v1alpha1/clustergateway_proxy.go @@ -379,7 +379,7 @@ var ( config.MetaApiGroupName, config.MetaApiVersionName, "clustergateways", - "[a-z0-9]([-a-z0-9]*[a-z0-9])?", + "[a-z0-9]([-.a-z0-9]*[a-z0-9])?", "proxy"}, "/")) clusterGatewayProxyQueryKeysToEscape = []string{"dryRun"} clusterGatewayProxyEscaperPrefix = "__"