2019-03-14 14:56:06 +00:00
|
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
|
|
kind: Middleware
|
|
|
|
metadata:
|
|
|
|
name: stripprefix
|
|
|
|
namespace: default
|
|
|
|
|
|
|
|
spec:
|
|
|
|
stripPrefix:
|
|
|
|
prefixes:
|
|
|
|
- /tobestripped
|
|
|
|
|
2021-11-26 11:10:11 +00:00
|
|
|
---
|
|
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
|
|
kind: Middleware
|
|
|
|
metadata:
|
|
|
|
name: ratelimit
|
|
|
|
namespace: default
|
|
|
|
|
|
|
|
spec:
|
|
|
|
rateLimit:
|
|
|
|
period: 1m
|
|
|
|
average: 6
|
|
|
|
burst: 12
|
|
|
|
sourceCriterion:
|
|
|
|
ipStrategy:
|
|
|
|
excludedIPs:
|
|
|
|
- 127.0.0.1/32
|
|
|
|
- 192.168.1.7
|
|
|
|
|
2019-03-14 14:56:06 +00:00
|
|
|
---
|
|
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
|
|
kind: Middleware
|
|
|
|
metadata:
|
|
|
|
name: addprefix
|
|
|
|
namespace: foo
|
|
|
|
|
|
|
|
spec:
|
|
|
|
addPrefix:
|
|
|
|
prefix: /tobeadded
|
|
|
|
|
|
|
|
---
|
|
|
|
apiVersion: traefik.containo.us/v1alpha1
|
|
|
|
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:
|
|
|
|
entryPoints:
|
|
|
|
- web
|
|
|
|
|
|
|
|
routes:
|
|
|
|
- match: Host(`foo.com`) && PathPrefix(`/tobestripped`)
|
|
|
|
priority: 12
|
|
|
|
kind: Rule
|
|
|
|
services:
|
|
|
|
- name: whoami
|
|
|
|
port: 80
|
|
|
|
middlewares:
|
|
|
|
- name: stripprefix
|
2021-11-26 11:10:11 +00:00
|
|
|
- name: ratelimit
|
2019-03-14 14:56:06 +00:00
|
|
|
- name: addprefix
|
|
|
|
namespace: foo
|