1
0
Fork 0

Added ReplacePathRegex middleware

This commit is contained in:
Tiscs Sun 2017-10-30 19:54:03 +08:00 committed by Traefiker
parent e8633d17e8
commit 5042c5bf40
5 changed files with 138 additions and 0 deletions

View file

@ -86,6 +86,7 @@ Following is the list of existing modifier rules:
- `AddPrefix: /products`: Add path prefix to the existing request path prior to forwarding the request to the backend.
- `ReplacePath: /serverless-path`: Replaces the path and adds the old path to the `X-Replaced-Path` header. Useful for mapping to AWS Lambda or Google Cloud Functions.
- `ReplacePathRegex: ^/api/v2/(.*) /api/$1`: Replaces the path with a regular expression and adds the old path to the `X-Replaced-Path` header. Separate the regular expression and the replacement by a space.
#### Matchers