At the moment creating HTTP to HTTPS redirects feel a bit complicated - you need to reference a listener sectionName in the Gateway and create 2 HTTPRoutes - one for redirecting to HTTPS, one for actual proxying of the traffic.
Would it make sense allowing to match on scheme and apply redirect filter?
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: my-httproute
spec:
parentRefs:
- name: my-gateway
hostnames:
- mydomain.com
rules:
# one rule to match on scheme & apply redirect filter
- matches:
- scheme: http
filters:
- type: RequestRedirect
requestRedirect:
scheme: https
# another rule to route traffic to backend
- backendRefs:
- name: my-svc
port: 80
At the moment creating HTTP to HTTPS redirects feel a bit complicated - you need to reference a listener
sectionName
in the Gateway and create 2HTTPRoutes
- one for redirecting to HTTPS, one for actual proxying of the traffic.Would it make sense allowing to match on
scheme
and apply redirect filter?