Add more selective match to increase the regex precedence

This commit is contained in:
2023-02-15 14:00:52 +01:00
parent 0957ad5f1c
commit 71a8507928
9 changed files with 29 additions and 15 deletions

View File

@@ -0,0 +1,15 @@
http:
middlewares:
force-trailing-slash:
chain:
middlewares:
- add-trailing-slash
- strip-after-slash
add-trailing-slash:
redirectregex:
regex: "^(https?://[^/]+/[a-z0-9_]+)$"
replacement: "${1}/"
permanent: true
strip-after-slash:
stripprefixregex:
regex: "/[a-z0-9_]+"