1
0
Fork 0

Make the behavior of prefix matching in Ingress consistent with Kubernetes doc

This commit is contained in:
Charlie Chiang 2025-05-20 20:40:05 +08:00 committed by GitHub
parent 8c6ed23c5f
commit 4790e4910f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 262 additions and 2 deletions

View file

@ -529,6 +529,29 @@ providers:
--providers.kubernetesingress.nativeLBByDefault=true
```
### `strictPrefixMatching`
_Optional, Default: false_
Make prefix matching strictly comply with the Kubernetes Ingress specification (path-element-wise matching instead of character-by-character string matching). For example, a PathPrefix of `/foo` will match `/foo`, `/foo/`, and `/foo/bar` but not `/foobar`.
```yaml tab="File (YAML)"
providers:
kubernetesIngress:
strictPrefixMatching: true
# ...
```
```toml tab="File (TOML)"
[providers.kubernetesIngress]
strictPrefixMatching = true
# ...
```
```bash tab="CLI"
--providers.kubernetesingress.strictPrefixMatching=true
```
### Further
To learn more about the various aspects of the Ingress specification that Traefik supports,