parent
a687343fed
commit
c3a28ab45d
2 changed files with 10 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue