Skip to content

Commit

Permalink
fix: path with sepecial characters warning #10281 #10308
Browse files Browse the repository at this point in the history
  • Loading branch information
sonbui00 committed Aug 20, 2023
1 parent 1a8ba5e commit bad25b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 4 additions & 1 deletion docs/examples/rewrite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -49,7 +52,7 @@ spec:
http:
paths:
- path: /something(/|$)(.*)
pathType: Prefix
pathType: ImplementationSpecific
backend:
service:
name: http-svc
Expand Down
9 changes: 6 additions & 3 deletions docs/user-guide/ingress-path-matching.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand All @@ -28,7 +31,7 @@ spec:
http:
paths:
- path: /foo/.*
pathType: Prefix
pathType: ImplementationSpecific
backend:
service:
name: test
Expand Down Expand Up @@ -95,7 +98,7 @@ spec:
http:
paths:
- path: /foo/bar/(.+)
pathType: Prefix
pathType: ImplementationSpecific
backend:
service:
name: service3
Expand Down Expand Up @@ -160,7 +163,7 @@ spec:
port:
number: 80
- path: /foo/bar/[A-Z0-9]{3}
pathType: Prefix
pathType: ImplementationSpecific
backend:
service:
name: test
Expand Down

0 comments on commit bad25b3

Please sign in to comment.