2023-03-20 14:38:08 +00:00
|
|
|
apiVersion: traefik.io/v1alpha1
|
2019-03-14 14:56:06 +00:00
|
|
|
kind: Middleware
|
2019-09-03 17:20:04 +00:00
|
|
|
metadata:
|
|
|
|
name: mychain
|
|
|
|
namespace: default
|
|
|
|
|
|
|
|
spec:
|
|
|
|
chain:
|
|
|
|
middlewares:
|
|
|
|
- name: stripprefix
|
|
|
|
|
|
|
|
---
|
2023-03-20 14:38:08 +00:00
|
|
|
apiVersion: traefik.io/v1alpha1
|
2019-09-03 17:20:04 +00:00
|
|
|
kind: Middleware
|
2019-03-14 14:56:06 +00:00
|
|
|
metadata:
|
|
|
|
name: stripprefix
|
|
|
|
namespace: default
|
|
|
|
|
|
|
|
spec:
|
2019-04-15 09:14:05 +00:00
|
|
|
stripPrefix:
|
2019-03-14 14:56:06 +00:00
|
|
|
prefixes:
|
|
|
|
- /tobestripped
|
|
|
|
|
|
|
|
---
|
2023-03-20 14:38:08 +00:00
|
|
|
apiVersion: traefik.io/v1alpha1
|
2019-03-14 14:56:06 +00:00
|
|
|
kind: IngressRoute
|
|
|
|
metadata:
|
2019-07-05 15:24:04 +00:00
|
|
|
name: test2.route
|
2019-03-14 14:56:06 +00:00
|
|
|
namespace: default
|
|
|
|
|
|
|
|
spec:
|
2019-04-15 09:14:05 +00:00
|
|
|
entryPoints:
|
2019-03-14 14:56:06 +00:00
|
|
|
- web
|
|
|
|
routes:
|
|
|
|
- match: Host(`foo.com`) && PathPrefix(`/tobestripped`)
|
|
|
|
kind: Rule
|
|
|
|
services:
|
|
|
|
- name: whoami
|
|
|
|
port: 80
|
|
|
|
middlewares:
|
2019-09-03 17:20:04 +00:00
|
|
|
- name: mychain
|