From c3a28ab45da2360ac5b590b640f6b5e6a20055b0 Mon Sep 17 00:00:00 2001 From: Son Bui Date: Mon, 4 Sep 2023 05:09:47 +0800 Subject: [PATCH] fix: path with sepecial characters warning #10281 #10308 (#10330) --- docs/examples/rewrite/README.md | 5 ++++- docs/user-guide/ingress-path-matching.md | 9 ++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/examples/rewrite/README.md b/docs/examples/rewrite/README.md index 5b42e1fc74b..aadcc1e4bb0 100644 --- a/docs/examples/rewrite/README.md +++ b/docs/examples/rewrite/README.md @@ -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 diff --git a/docs/user-guide/ingress-path-matching.md b/docs/user-guide/ingress-path-matching.md index 321ddfa8e7a..dd618e08b60 100644 --- a/docs/user-guide/ingress-path-matching.md +++ b/docs/user-guide/ingress-path-matching.md @@ -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