On this page
Overview
Modify the headers of HTTP requests and responses. For more information, see the Gateway API docs for header filters.
Configuration options
You can configure the header modifier filter at two levels:
- HTTPRoute: For the native way in Kubernetes Gateway API, configure a header modifier filter in the HTTPRoute. You can choose to apply the header modifier filter to all the routes that are defined in the HTTPRoute, or to a selection of
backendRefs. This route-level policy takes precedence over any GlooTrafficPolicy that you might configure. For more information, see the Kubernetes Gateway API docs. - GlooTrafficPolicy (Envoy-based kgateway proxy only): For more flexibility to reuse the header modifier filter across HTTPRoutes, specific routes and Gateways, configure a header modifier filter in the GlooTrafficPolicy. You can attach a GlooTrafficPolicy to a Gateway, all HTTPRoutes via
targetRefs, or an individual route viaextensionRef. To attach to abackendRef, use a header modifier filter in the HTTPRoute instead. For more information about attachment and merging rules, see the GlooTrafficPolicy concept docs.