Skip to content

Instantly share code, notes, and snippets.

@kazshinohara
Last active December 15, 2021 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kazshinohara/a660d410e9346e3c30b25010060a983e to your computer and use it in GitHub Desktop.
Save kazshinohara/a660d410e9346e3c30b25010060a983e to your computer and use it in GitHub Desktop.
kind: HTTPRoute
apiVersion: networking.x-k8s.io/v1alpha1
metadata:
name: internal-httproute-header-rewrite
labels:
gateway: internal-gateway
spec:
hostnames:
- "i-gw.gcpx.org"
rules:
- forwardTo:
- serviceName: whereami-v1
port: 8080
- matches:
- headers:
type: Exact
values:
env: v2
filters:
- type: RequestHeaderModifier
requestHeaderModifier:
add:
my-header: hello
remove:
- my-header
forwardTo:
- serviceName: whereami-v2
port: 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment