Skip to content

GEP: Support Matching Scheme in HTTPRouteMatch #2809

Closed as not planned
Closed as not planned
@dprotaso

Description

@dprotaso

The scheme match via pseudo headers suggested in #2455 only applies to HTTP/2. It would be useful to still match on the scheme for any HTTP version.

One use case is the match could be used to prevent redirect loops. From #1185 (comment)

apiVersion: gateway.networking.k8s.io/v1alpha2
kind: HTTPRoute
metadata:
  name: http-filter-redirect
spec:
  hostnames:
    - redirect.example
  rules:
    - matches:
      - scheme: http 
      filters:
      - type: RequestRedirect
        requestRedirect:
          scheme: https
          statusCode: 301

In the above example we have the HTTPRoute perform a redirect if the scheme of the request is http

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions