envoyproxy/gateway

Validate String Formatter Values for HTTPRoute

Open

#7,192 opened on 2025年10月11日

GitHub で見る
 (4 comments) (1 reaction) (0 assignees)Go (802 forks)auto 404
help wantedkind/bug

Repository metrics

Stars
 (2,871 stars)
PR merge metrics
 (PR metrics pending)

説明

Description:

Envoy Gateway Control Plane will push bad HTTPRoute configurations to the Data Plane, wherein it gets rejected affecting all configuration.

Repro steps:

Add this to any HTTPRoute

    filters:
    - requestHeaderModifier:
        add:
        - name: X-Real-IP
          value: '%REQ(X-Real-IP?x-client-ip?CF-Connecting-IP)%'
        - name: X-Request-Start
          value: t=%START_TIME(%s.%6f)%
      type: RequestHeaderModifier

Monitor the Control Plane logs. You should see something like

envoy-gateway-78757f47d7-hnww7 envoy-gateway 2025-10-10T23:56:03.409Z   ERROR   xds-server      cache/snapshotcache.go:346      Envoy rejected the last update with code 13 and message More than 1 alternative header specified in token: X-Real-IP?x-client-ip?CF-Connecting-IP

Also note the Accepted status on the HTTPRoute CRD

Status:
  Parents:
    Conditions:
      Last Transition Time:  2025-10-10T23:56:03Z
      Message:               Route is accepted
      Observed Generation:   49
      Reason:                Accepted
      Status:                True
      Type:                  Accepted
      Last Transition Time:  2025-10-10T23:56:03Z
      Message:               Resolved all the Object references for the Route
      Observed Generation:   49
      Reason:                ResolvedRefs
      Status:                True
      Type:                  ResolvedRefs
    Controller Name:         gateway.envoyproxy.io/gatewayclass-controller

Environment:

Envoy Gateway Version: 1.4.0

コントリビューターガイド