Replies: 4 comments 10 replies
-
|
@Robbilie Just out of curiosity, when you attempt to create this Route, what errors are you getting back? |
Beta Was this translation helpful? Give feedback.
-
|
#5061 issue for tracking this feature request |
Beta Was this translation helpful? Give feedback.
-
|
Gateway API is proposing regex for rewrites now, which is great timing. We'll keep an eye on this GEP and API so that we can natively support this feature through the Gateway API: kubernetes-sigs/gateway-api#4361 |
Beta Was this translation helpful? Give feedback.
-
|
@Robbilie I'm realizing you may be able to accomplish what you want without regex. Would this work? apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: rewrite
spec:
parentRefs:
- name: nginx
hostnames:
- rewrite.bar.com
rules:
- matches:
- path:
type: PathPrefix
value: /something
backendRefs:
- name: http-svc
port: 80
filters:
- type: URLRewrite
urlRewrite:
path:
type: ReplacePrefixMatch
replacePrefixMatch: /This should take any path that is prefixed with |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Nginx Ingress Controller supported using regex captured groups for regex path matching:
https://kubernetes.github.io/ingress-nginx/examples/rewrite/#rewrite-target
I would like to request the functionality for ngf aswell.
An example:
would become:
(opening the discussion as per #3110 (comment))
Beta Was this translation helpful? Give feedback.
All reactions