mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
OAS-9960 | less strict ArangoRoute path validation (#1774)
Co-authored-by: Adam Janikowski <12255597+ajanikow@users.noreply.github.com>
This commit is contained in:
parent
e85370817a
commit
02e4ef44b3
3 changed files with 3 additions and 2 deletions
|
@ -27,6 +27,7 @@
|
||||||
- (Feature) Add DebugPackage to the OPS Binary
|
- (Feature) Add DebugPackage to the OPS Binary
|
||||||
- (Feature) (Networking) ArangoRoute Protocol
|
- (Feature) (Networking) ArangoRoute Protocol
|
||||||
- (Feature) (Platform) Platform Requirements support
|
- (Feature) (Platform) Platform Requirements support
|
||||||
|
- (Improvement) Drop slash requirement from ArangoRoute
|
||||||
|
|
||||||
## [1.2.43](https://github.com/arangodb/kube-arangodb/tree/1.2.43) (2024-10-14)
|
## [1.2.43](https://github.com/arangodb/kube-arangodb/tree/1.2.43) (2024-10-14)
|
||||||
- (Feature) ArangoRoute CRD
|
- (Feature) ArangoRoute CRD
|
||||||
|
|
|
@ -36,7 +36,7 @@ import (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
resourceNameRE = regexp.MustCompile(`^([0-9\-\.a-z])+$`)
|
resourceNameRE = regexp.MustCompile(`^([0-9\-\.a-z])+$`)
|
||||||
apiPathRE = regexp.MustCompile(`^/([_A-Za-z0-9\-]+/)*$`)
|
apiPathRE = regexp.MustCompile(`^(/[_A-Za-z0-9\-]+)*/?$`)
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|
|
@ -36,7 +36,7 @@ func Test_ValidateAPIPath(t *testing.T) {
|
||||||
require.NoError(t, ValidateAPIPath(""))
|
require.NoError(t, ValidateAPIPath(""))
|
||||||
require.NoError(t, ValidateAPIPath("/"))
|
require.NoError(t, ValidateAPIPath("/"))
|
||||||
require.Error(t, ValidateAPIPath("//"))
|
require.Error(t, ValidateAPIPath("//"))
|
||||||
require.Error(t, ValidateAPIPath("/api/zz"))
|
require.NoError(t, ValidateAPIPath("/api/zz"))
|
||||||
require.NoError(t, ValidateAPIPath("/api/"))
|
require.NoError(t, ValidateAPIPath("/api/"))
|
||||||
require.NoError(t, ValidateAPIPath("/api/test/qw/"))
|
require.NoError(t, ValidateAPIPath("/api/test/qw/"))
|
||||||
require.NoError(t, ValidateAPIPath("/api/test/2/"))
|
require.NoError(t, ValidateAPIPath("/api/test/2/"))
|
||||||
|
|
Loading…
Reference in a new issue