-
Notifications
You must be signed in to change notification settings - Fork 67
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
Hello,
I like to use the ReplacePrefixMatch feature on URLRewrite filters of the gateway api.
Currently only ReplaceFullPath is supported.
Example Usage:
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: test
spec:
hostnames:
- domain.local
parentRefs:
- group: gateway.networking.k8s.io
kind: Gateway
name: gateway
rules:
- backendRefs:
- group: ""
kind: Service
name: backend-service
port: 80
matches:
- path:
type: PathPrefix
value: /
- backendRefs:
- group: ""
kind: Service
name: other-service
port: 80
matches:
- path:
type: PathPrefix
value: /other
filters:
- type: URLRewrite
urlRewrite:
hostname: other-domain.local
path:
type: ReplacePrefixMatch
replacePrefixMatch: /This sends every path under /other to the other backend service. It removes the /other path prefix from the requests.
Describe the solution you'd like
Implement ReplacePrefixMatch for HTTPRoute URLRewrite filters.
Describe alternatives you've considered
- Strip the prefix inside the application. This is only possible if the application supports it (which is often not the case).
- Route the request though another reverse proy which supports the rewrite. This adds additional overhead.
Additional context
Link to documention for URLRewrite: https://gateway-api.sigs.k8s.io/guides/http-redirect-rewrite/#rewrites
Api Documentation: https://gateway-api.sigs.k8s.io/reference/spec/#httppathmodifier
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request