Add more selective match to increase the regex precedence
This commit is contained in:
15
containers/traefik/files/conf/force_trailing_slash.yml
Normal file
15
containers/traefik/files/conf/force_trailing_slash.yml
Normal 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_]+"
|
||||
Reference in New Issue
Block a user