Fix strip prefix documentation

This commit is contained in:
Michael 2019-04-29 19:00:05 +02:00 committed by Traefiker Bot
parent 0f2b774ea1
commit 21dec70971

View file

@ -10,39 +10,39 @@ Remove the specified prefixes from the URL path.
## Configuration Examples ## Configuration Examples
```yaml tab="Docker" ```yaml tab="Docker"
# Replace the path by /foo # Strip prefix /foobar and /fiibar
labels: labels:
- "traefik.http.middlewares.test-stripprefix.stripprefix.prefixes=foobar, fiibar" - "traefik.http.middlewares.test-stripprefix.stripprefix.prefixes=/foobar, /fiibar"
``` ```
```yaml tab="Kubernetes" ```yaml tab="Kubernetes"
# Replace the path by /foo # Strip prefix /foobar and /fiibar
apiVersion: traefik.containo.us/v1alpha1 apiVersion: traefik.containo.us/v1alpha1
kind: Middleware kind: Middleware
metadata: metadata:
name: test-stripprefix name: test-stripprefix
spec: spec:
StripPrefix: StripPrefix:
prefixes: "foobar, fiibar" prefixes: "/foobar, /fiibar"
``` ```
```json tab="Marathon" ```json tab="Marathon"
"labels": { "labels": {
"traefik.http.middlewares.test-stripprefix.stripprefix.prefixes": "foobar, fiibar" "traefik.http.middlewares.test-stripprefix.stripprefix.prefixes": "/foobar, /fiibar"
} }
``` ```
```yaml tab="Rancher" ```yaml tab="Rancher"
# Replace the path by /foo # Strip prefix /foobar and /fiibar
labels: labels:
- "traefik.http.middlewares.test-stripprefix.stripprefix.prefixes=foobar, fiibar" - "traefik.http.middlewares.test-stripprefix.stripprefix.prefixes=/foobar, /fiibar"
``` ```
```toml tab="File" ```toml tab="File"
# Replace the path by /foo # Strip prefix /foobar and /fiibar
[http.middlewares] [http.middlewares]
[http.middlewares.test-stripprefix.StripPrefix] [http.middlewares.test-stripprefix.StripPrefix]
prefixes: "foobar, fiibar" prefixes = ["/foobar", "/fiibar"]
``` ```
## Configuration Options ## Configuration Options