fix: path with sepecial characters warning #10281 #10308 (#10330)

This commit is contained in:
Son Bui 2023-09-04 05:09:47 +08:00 committed by GitHub
parent a687343fed
commit c3a28ab45d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View file

@ -30,6 +30,9 @@ Rewriting can be controlled using the following annotations:
!!! note
[Captured groups](https://www.regular-expressions.info/refcapture.html) are saved in numbered placeholders, chronologically, in the form `$1`, `$2` ... `$n`. These placeholders can be used as parameters in the `rewrite-target` annotation.
!!! note
Please see the [FAQ](../faq.md#validation-of-path) for Validation Of __`path`__
Create an Ingress rule with a rewrite annotation:
```console
@ -49,7 +52,7 @@ spec:
http:
paths:
- path: /something(/|$)(.*)
pathType: Prefix
pathType: ImplementationSpecific
backend:
service:
name: http-svc

View file

@ -5,6 +5,9 @@
!!! important
Regular expressions and wild cards are not supported in the `spec.rules.host` field. Full hostnames must be used.
!!! note
Please see the [FAQ](../faq.md#validation-of-path) for Validation Of __`path`__
The ingress controller supports **case insensitive** regular expressions in the `spec.rules.http.paths.path` field.
This can be enabled by setting the `nginx.ingress.kubernetes.io/use-regex` annotation to `true` (the default is false).
@ -28,7 +31,7 @@ spec:
http:
paths:
- path: /foo/.*
pathType: Prefix
pathType: ImplementationSpecific
backend:
service:
name: test
@ -95,7 +98,7 @@ spec:
http:
paths:
- path: /foo/bar/(.+)
pathType: Prefix
pathType: ImplementationSpecific
backend:
service:
name: service3
@ -160,7 +163,7 @@ spec:
port:
number: 80
- path: /foo/bar/[A-Z0-9]{3}
pathType: Prefix
pathType: ImplementationSpecific
backend:
service:
name: test