#60541·istio

gatewayapi: ReplaceFullPath with RegularExpression doesnt work in HTTPRoute

Author: aenshin-ppCreated Jun 10, 2026Updated Sep 17, 2026
Labelslifecycle/stalearea/ambient

Is this the right place to submit this?

  • This is not a security vulnerability or a crashing bug
  • This is not a question about how to use Istio

Bug Description

Hello Istio Gateway folks,

There seems to be an issue with HTTPRoute spec. Here is the example spec:

apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
spec:
  hostnames:
  - xxx
  parentRefs:
  - group: gateway.networking.k8s.io
    kind: Gateway
    name: lb-gateway
    namespace: istio-gateway-lb
  rules:
  - backendRefs:
    - group: ""
      kind: Service
      name: xxx
      port: 80
      weight: 1
    filters:
    - type: URLRewrite
      urlRewrite:
        path:
          replaceFullPath: /api/$1
          type: ReplaceFullPath
    matches:
    - path:
        type: RegularExpression
        value: (?i)/(.*)

If you try this spec, then you will get the /api/$1 literal in URI without substitution. I guess the substitution must take place and we must see something like /api/foo/bar where /foo/bar is original path from original request.

Version

latest

Additional Information

No response