fix: stripPrefixRegex documentation.

This commit is contained in:
Ludovic Fernandez 2019-09-02 10:52:04 +02:00 committed by Traefiker Bot
parent 0d9cf697fa
commit 17554202f6
5 changed files with 138 additions and 98 deletions

View file

@ -23,7 +23,8 @@ metadata:
name: test-stripprefixregex
spec:
stripPrefixRegex:
regex: "^/foo/(.*)"
regex:
- "^/foo/(.*)"
```
```json tab="Marathon"
@ -42,7 +43,7 @@ labels:
# Replace the path by /foo
[http.middlewares]
[http.middlewares.test-stripprefixregex.stripPrefixRegex]
regex = "^/foo/(.*)"
regex = ["^/foo/(.*)"]
```
```yaml tab="File (YAML)"
@ -51,7 +52,8 @@ http:
middlewares:
test-stripprefixregex:
stripPrefixRegex:
regex: "^/foo/(.*)"
regex:
- "^/foo/(.*)"
```
## Configuration Options

View file

@ -45,13 +45,13 @@
- "traefik.http.middlewares.middleware09.headers.customrequestheaders.name1=foobar"
- "traefik.http.middlewares.middleware09.headers.customresponseheaders.name0=foobar"
- "traefik.http.middlewares.middleware09.headers.customresponseheaders.name1=foobar"
- "traefik.http.middlewares.middleware09.headers.featurepolicy=foobar"
- "traefik.http.middlewares.middleware09.headers.forcestsheader=true"
- "traefik.http.middlewares.middleware09.headers.framedeny=true"
- "traefik.http.middlewares.middleware09.headers.hostsproxyheaders=foobar, foobar"
- "traefik.http.middlewares.middleware09.headers.isdevelopment=true"
- "traefik.http.middlewares.middleware09.headers.publickey=foobar"
- "traefik.http.middlewares.middleware09.headers.referrerpolicy=foobar"
- "traefik.http.middlewares.middleware09.headers.featurepolicy=foobar"
- "traefik.http.middlewares.middleware09.headers.sslforcehost=true"
- "traefik.http.middlewares.middleware09.headers.sslhost=foobar"
- "traefik.http.middlewares.middleware09.headers.sslproxyheaders.name0=foobar"
@ -65,10 +65,9 @@
- "traefik.http.middlewares.middleware10.ipwhitelist.ipstrategy.excludedips=foobar, foobar"
- "traefik.http.middlewares.middleware10.ipwhitelist.sourcerange=foobar, foobar"
- "traefik.http.middlewares.middleware11.inflightreq.amount=42"
- "traefik.http.middlewares.middleware11.inflightreq.sourcecriterion.requestheadername=foobar"
- "traefik.http.middlewares.middleware11.inflightreq.sourcecriterion.requesthost=true"
- "traefik.http.middlewares.middleware11.inflightreq.sourcecriterion.ipstrategy.depth=42"
- "traefik.http.middlewares.middleware11.inflightreq.sourcecriterion.ipstrategy.excludedips=foobar, foobar"
- "traefik.http.middlewares.middleware11.inflightreq.sourcecriterion.requestheadername=foobar"
- "traefik.http.middlewares.middleware11.inflightreq.sourcecriterion.requesthost=true"
- "traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.commonname=true"
- "traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.country=true"
@ -88,18 +87,24 @@
- "traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.province=true"
- "traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.serialnumber=true"
- "traefik.http.middlewares.middleware12.passtlsclientcert.pem=true"
- "traefik.http.middlewares.middleware13.redirectregex.permanent=true"
- "traefik.http.middlewares.middleware13.redirectregex.regex=foobar"
- "traefik.http.middlewares.middleware13.redirectregex.replacement=foobar"
- "traefik.http.middlewares.middleware14.redirectscheme.permanent=true"
- "traefik.http.middlewares.middleware14.redirectscheme.port=foobar"
- "traefik.http.middlewares.middleware14.redirectscheme.scheme=foobar"
- "traefik.http.middlewares.middleware15.replacepath.path=foobar"
- "traefik.http.middlewares.middleware16.replacepathregex.regex=foobar"
- "traefik.http.middlewares.middleware16.replacepathregex.replacement=foobar"
- "traefik.http.middlewares.middleware17.retry.attempts=42"
- "traefik.http.middlewares.middleware18.stripprefix.prefixes=foobar, foobar"
- "traefik.http.middlewares.middleware19.stripprefixregex.regex=foobar, foobar"
- "traefik.http.middlewares.middleware13.ratelimit.average=42"
- "traefik.http.middlewares.middleware13.ratelimit.burst=42"
- "traefik.http.middlewares.middleware13.ratelimit.sourcecriterion.ipstrategy.depth=42"
- "traefik.http.middlewares.middleware13.ratelimit.sourcecriterion.ipstrategy.excludedips=foobar, foobar"
- "traefik.http.middlewares.middleware13.ratelimit.sourcecriterion.requestheadername=foobar"
- "traefik.http.middlewares.middleware13.ratelimit.sourcecriterion.requesthost=true"
- "traefik.http.middlewares.middleware14.redirectregex.permanent=true"
- "traefik.http.middlewares.middleware14.redirectregex.regex=foobar"
- "traefik.http.middlewares.middleware14.redirectregex.replacement=foobar"
- "traefik.http.middlewares.middleware15.redirectscheme.permanent=true"
- "traefik.http.middlewares.middleware15.redirectscheme.port=foobar"
- "traefik.http.middlewares.middleware15.redirectscheme.scheme=foobar"
- "traefik.http.middlewares.middleware16.replacepath.path=foobar"
- "traefik.http.middlewares.middleware17.replacepathregex.regex=foobar"
- "traefik.http.middlewares.middleware17.replacepathregex.replacement=foobar"
- "traefik.http.middlewares.middleware18.retry.attempts=42"
- "traefik.http.middlewares.middleware19.stripprefix.prefixes=foobar, foobar"
- "traefik.http.middlewares.middleware20.stripprefixregex.regex=foobar, foobar"
- "traefik.http.routers.router0.entrypoints=foobar, foobar"
- "traefik.http.routers.router0.middlewares=foobar, foobar"
- "traefik.http.routers.router0.priority=42"
@ -135,8 +140,8 @@
- "traefik.http.services.service0.loadbalancer.passhostheader=true"
- "traefik.http.services.service0.loadbalancer.responseforwarding.flushinterval=foobar"
- "traefik.http.services.service0.loadbalancer.sticky=true"
- "traefik.http.services.service0.loadbalancer.sticky.cookie.name=foobar"
- "traefik.http.services.service0.loadbalancer.sticky.cookie.httponly=true"
- "traefik.http.services.service0.loadbalancer.sticky.cookie.name=foobar"
- "traefik.http.services.service0.loadbalancer.sticky.cookie.secure=true"
- "traefik.http.services.service0.loadbalancer.server.port=foobar"
- "traefik.http.services.service0.loadbalancer.server.scheme=foobar"
@ -151,8 +156,8 @@
- "traefik.http.services.service1.loadbalancer.passhostheader=true"
- "traefik.http.services.service1.loadbalancer.responseforwarding.flushinterval=foobar"
- "traefik.http.services.service1.loadbalancer.sticky=true"
- "traefik.http.services.service1.loadbalancer.sticky.cookie.name=foobar"
- "traefik.http.services.service1.loadbalancer.sticky.cookie.httponly=true"
- "traefik.http.services.service1.loadbalancer.sticky.cookie.name=foobar"
- "traefik.http.services.service1.loadbalancer.sticky.cookie.secure=true"
- "traefik.http.services.service1.loadbalancer.server.port=foobar"
- "traefik.http.services.service1.loadbalancer.server.scheme=foobar"

View file

@ -62,17 +62,28 @@
[http.services.Service01.loadBalancer.responseForwarding]
flushInterval = "foobar"
[http.services.Service02]
[http.services.Service02.weighted]
[http.services.Service02.mirroring]
service = "foobar"
[[http.services.Service02.weighted.services]]
[[http.services.Service02.mirroring.mirrors]]
name = "foobar"
percent = 42
[[http.services.Service02.mirroring.mirrors]]
name = "foobar"
percent = 42
[http.services.Service03]
[http.services.Service03.weighted]
[[http.services.Service03.weighted.services]]
name = "foobar"
weight = 42
[[http.services.Service02.weighted.services]]
[[http.services.Service03.weighted.services]]
name = "foobar"
weight = 42
[http.services.Service02.weighted.sticky]
[http.services.Service02.weighted.sticky.cookie]
[http.services.Service03.weighted.sticky]
[http.services.Service03.weighted.sticky.cookie]
name = "foobar"
secure = true
httpOnly = true
@ -202,30 +213,40 @@
serialNumber = true
domainComponent = true
[http.middlewares.Middleware13]
[http.middlewares.Middleware13.redirectRegex]
[http.middlewares.Middleware13.rateLimit]
average = 42
burst = 42
[http.middlewares.Middleware13.rateLimit.sourceCriterion]
requestHeaderName = "foobar"
requestHost = true
[http.middlewares.Middleware13.rateLimit.sourceCriterion.ipStrategy]
depth = 42
excludedIPs = ["foobar", "foobar"]
[http.middlewares.Middleware14]
[http.middlewares.Middleware14.redirectRegex]
regex = "foobar"
replacement = "foobar"
permanent = true
[http.middlewares.Middleware14]
[http.middlewares.Middleware14.redirectScheme]
[http.middlewares.Middleware15]
[http.middlewares.Middleware15.redirectScheme]
scheme = "foobar"
port = "foobar"
permanent = true
[http.middlewares.Middleware15]
[http.middlewares.Middleware15.replacePath]
path = "foobar"
[http.middlewares.Middleware16]
[http.middlewares.Middleware16.replacePathRegex]
[http.middlewares.Middleware16.replacePath]
path = "foobar"
[http.middlewares.Middleware17]
[http.middlewares.Middleware17.replacePathRegex]
regex = "foobar"
replacement = "foobar"
[http.middlewares.Middleware17]
[http.middlewares.Middleware17.retry]
attempts = 42
[http.middlewares.Middleware18]
[http.middlewares.Middleware18.stripPrefix]
prefixes = ["foobar", "foobar"]
[http.middlewares.Middleware18.retry]
attempts = 42
[http.middlewares.Middleware19]
[http.middlewares.Middleware19.stripPrefixRegex]
[http.middlewares.Middleware19.stripPrefix]
prefixes = ["foobar", "foobar"]
[http.middlewares.Middleware20]
[http.middlewares.Middleware20.stripPrefixRegex]
regex = ["foobar", "foobar"]
[tcp]

View file

@ -69,6 +69,14 @@ http:
responseForwarding:
flushInterval: foobar
Service02:
mirroring:
service: foobar
mirrors:
- name: foobar
percent: 42
- name: foobar
percent: 42
Service03:
weighted:
services:
- name: foobar
@ -201,9 +209,11 @@ http:
inFlightReq:
amount: 42
sourceCriterion:
ipStrategy:
ipstrategy:
depth: 42
excludedIPs: [ foobar, foobar ]
excludedIPs:
- foobar
- foobar
requestHeaderName: foobar
requestHost: true
Middleware12:
@ -230,45 +240,47 @@ http:
serialNumber: true
domainComponent: true
Middleware13:
redirectRegex:
regex: foobar
replacement: foobar
permanent: true
Middleware14:
redirectScheme:
scheme: foobar
port: foobar
permanent: true
Middleware15:
replacePath:
path: foobar
Middleware16:
replacePathRegex:
regex: foobar
replacement: foobar
Middleware17:
retry:
attempts: 42
Middleware18:
stripPrefix:
prefixes:
- foobar
- foobar
Middleware19:
stripPrefixRegex:
regex:
- foobar
- foobar
Middleware20:
rateLimit:
average: 42
burst: 42
sourceCriterion:
ipStrategy:
ipstrategy:
depth: 42
excludedIPs: [ foobar, foobar ]
excludedIPs:
- foobar
- foobar
requestHeaderName: foobar
requestHost: true
Middleware14:
redirectRegex:
regex: foobar
replacement: foobar
permanent: true
Middleware15:
redirectScheme:
scheme: foobar
port: foobar
permanent: true
Middleware16:
replacePath:
path: foobar
Middleware17:
replacePathRegex:
regex: foobar
replacement: foobar
Middleware18:
retry:
attempts: 42
Middleware19:
stripPrefix:
prefixes:
- foobar
- foobar
Middleware20:
stripPrefixRegex:
regex:
- foobar
- foobar
tcp:
routers:
TCPRouter0:

View file

@ -45,13 +45,13 @@
"traefik.http.middlewares.middleware09.headers.customrequestheaders.name1": "foobar",
"traefik.http.middlewares.middleware09.headers.customresponseheaders.name0": "foobar",
"traefik.http.middlewares.middleware09.headers.customresponseheaders.name1": "foobar",
"traefik.http.middlewares.middleware09.headers.featurepolicy": "foobar",
"traefik.http.middlewares.middleware09.headers.forcestsheader": "true",
"traefik.http.middlewares.middleware09.headers.framedeny": "true",
"traefik.http.middlewares.middleware09.headers.hostsproxyheaders": "foobar, foobar",
"traefik.http.middlewares.middleware09.headers.isdevelopment": "true",
"traefik.http.middlewares.middleware09.headers.publickey": "foobar",
"traefik.http.middlewares.middleware09.headers.referrerpolicy": "foobar",
"traefik.http.middlewares.middleware09.headers.featurepolicy": "foobar",
"traefik.http.middlewares.middleware09.headers.sslforcehost": "true",
"traefik.http.middlewares.middleware09.headers.sslhost": "foobar",
"traefik.http.middlewares.middleware09.headers.sslproxyheaders.name0": "foobar",
@ -64,11 +64,11 @@
"traefik.http.middlewares.middleware10.ipwhitelist.ipstrategy.depth": "42",
"traefik.http.middlewares.middleware10.ipwhitelist.ipstrategy.excludedips": "foobar, foobar",
"traefik.http.middlewares.middleware10.ipwhitelist.sourcerange": "foobar, foobar",
"traefik.http.middlewares.Middleware11.inflightreq.amount": "42",
"traefik.http.middlewares.Middleware11.inflightreq.sourcecriterion.ipstrategy.depth": "42",
"traefik.http.middlewares.Middleware11.inflightreq.sourcecriterion.ipstrategy.excludedips": "foobar, fiibar",
"traefik.http.middlewares.Middleware11.inflightreq.sourcecriterion.requestheadername": "foobar",
"traefik.http.middlewares.Middleware11.inflightreq.sourcecriterion.requesthost": "true",
"traefik.http.middlewares.middleware11.inflightreq.amount": "42",
"traefik.http.middlewares.middleware11.inflightreq.sourcecriterion.ipstrategy.depth": "42",
"traefik.http.middlewares.middleware11.inflightreq.sourcecriterion.ipstrategy.excludedips": "foobar, foobar",
"traefik.http.middlewares.middleware11.inflightreq.sourcecriterion.requestheadername": "foobar",
"traefik.http.middlewares.middleware11.inflightreq.sourcecriterion.requesthost": "true",
"traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.commonname": "true",
"traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.country": "true",
"traefik.http.middlewares.middleware12.passtlsclientcert.info.issuer.domaincomponent": "true",
@ -87,24 +87,24 @@
"traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.province": "true",
"traefik.http.middlewares.middleware12.passtlsclientcert.info.subject.serialnumber": "true",
"traefik.http.middlewares.middleware12.passtlsclientcert.pem": "true",
"traefik.http.middlewares.middleware13.redirectregex.permanent": "true",
"traefik.http.middlewares.middleware13.redirectregex.regex": "foobar",
"traefik.http.middlewares.middleware13.redirectregex.replacement": "foobar",
"traefik.http.middlewares.middleware14.redirectscheme.permanent": "true",
"traefik.http.middlewares.middleware14.redirectscheme.port": "foobar",
"traefik.http.middlewares.middleware14.redirectscheme.scheme": "foobar",
"traefik.http.middlewares.middleware15.replacepath.path": "foobar",
"traefik.http.middlewares.middleware16.replacepathregex.regex": "foobar",
"traefik.http.middlewares.middleware16.replacepathregex.replacement": "foobar",
"traefik.http.middlewares.middleware17.retry.attempts": "42",
"traefik.http.middlewares.middleware18.stripprefix.prefixes": "foobar, foobar",
"traefik.http.middlewares.middleware19.stripprefixregex.regex": "foobar, foobar",
"traefik.http.middlewares.Middleware20.ratelimit.average": "42",
"traefik.http.middlewares.Middleware20.ratelimit.burst": "42",
"traefik.http.middlewares.Middleware20.ratelimit.sourcecriterion.requestheadername": "foobar",
"traefik.http.middlewares.Middleware20.ratelimit.sourcecriterion.requesthost": "true",
"traefik.http.middlewares.Middleware20.ratelimit.sourcecriterion.ipstrategy.depth": "42",
"traefik.http.middlewares.Middleware20.ratelimit.sourcecriterion.ipstrategy.excludedips": "foobar, foobar",
"traefik.http.middlewares.middleware13.ratelimit.average": "42",
"traefik.http.middlewares.middleware13.ratelimit.burst": "42",
"traefik.http.middlewares.middleware13.ratelimit.sourcecriterion.ipstrategy.depth": "42",
"traefik.http.middlewares.middleware13.ratelimit.sourcecriterion.ipstrategy.excludedips": "foobar, foobar",
"traefik.http.middlewares.middleware13.ratelimit.sourcecriterion.requestheadername": "foobar",
"traefik.http.middlewares.middleware13.ratelimit.sourcecriterion.requesthost": "true",
"traefik.http.middlewares.middleware14.redirectregex.permanent": "true",
"traefik.http.middlewares.middleware14.redirectregex.regex": "foobar",
"traefik.http.middlewares.middleware14.redirectregex.replacement": "foobar",
"traefik.http.middlewares.middleware15.redirectscheme.permanent": "true",
"traefik.http.middlewares.middleware15.redirectscheme.port": "foobar",
"traefik.http.middlewares.middleware15.redirectscheme.scheme": "foobar",
"traefik.http.middlewares.middleware16.replacepath.path": "foobar",
"traefik.http.middlewares.middleware17.replacepathregex.regex": "foobar",
"traefik.http.middlewares.middleware17.replacepathregex.replacement": "foobar",
"traefik.http.middlewares.middleware18.retry.attempts": "42",
"traefik.http.middlewares.middleware19.stripprefix.prefixes": "foobar, foobar",
"traefik.http.middlewares.middleware20.stripprefixregex.regex": "foobar, foobar",
"traefik.http.routers.router0.entrypoints": "foobar, foobar",
"traefik.http.routers.router0.middlewares": "foobar, foobar",
"traefik.http.routers.router0.priority": "42",
@ -140,8 +140,8 @@
"traefik.http.services.service0.loadbalancer.passhostheader": "true",
"traefik.http.services.service0.loadbalancer.responseforwarding.flushinterval": "foobar",
"traefik.http.services.service0.loadbalancer.sticky": "true",
"traefik.http.services.service0.loadbalancer.sticky.cookie.name": "foobar",
"traefik.http.services.service0.loadbalancer.sticky.cookie.httponly": "true",
"traefik.http.services.service0.loadbalancer.sticky.cookie.name": "foobar",
"traefik.http.services.service0.loadbalancer.sticky.cookie.secure": "true",
"traefik.http.services.service0.loadbalancer.server.port": "foobar",
"traefik.http.services.service0.loadbalancer.server.scheme": "foobar",
@ -156,9 +156,9 @@
"traefik.http.services.service1.loadbalancer.passhostheader": "true",
"traefik.http.services.service1.loadbalancer.responseforwarding.flushinterval": "foobar",
"traefik.http.services.service1.loadbalancer.sticky": "true",
"traefik.http.services.service1.loadbalancer.sticky.cookie.httponly": "true",
"traefik.http.services.service1.loadbalancer.sticky.cookie.name": "foobar",
"traefik.http.services.service1.loadbalancer.sticky.cookie.secure": "true",
"traefik.http.services.service1.loadbalancer.sticky.cookie.httponly": "true",
"traefik.http.services.service1.loadbalancer.server.port": "foobar",
"traefik.http.services.service1.loadbalancer.server.scheme": "foobar",
"traefik.tcp.routers.tcprouter0.entrypoints": "foobar, foobar",