Regex
Summary
If Regex is set, the route will only match incoming requests with a path that matches the specified regular expression. The supported syntax is the same as the Go regexp package which is based on re2.
How to configure
- Core
- Enterprise
- Kubernetes
YAML/JSON setting | Type | Usage |
---|---|---|
regex | string | optional |
Set Regex in the Console:
Name | Type | Usage |
---|---|---|
path_regex | string | optional |
Examples
regex: "^/(admin|superuser)/.*$"
# ingress
ingress.pomerium.io/path_regex: 'true'
name: example
spec:
ingressClassName: pomerium
rules:
- host: example.localhost.pomerium.io
http:
paths:
- backend:
service:
name: example
port:
name: http
path: ^/(admin|superuser)/.*$
pathType: ImplementationSpecific