Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPBackendRef ResponseHeaderModifier Conformance Test #2821

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions conformance/tests/httproute-response-header-modifier-backend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: response-header-modifier
namespace: gateway-conformance-infra
spec:
parentRefs:
- name: same-namespace
rules:
- matches:
- path:
type: PathPrefix
value: /set
backendRefs:
- name: infra-backend-v1
port: 8080
filters:
- type: ResponseHeaderModifier
responseHeaderModifier:
set:
- name: X-Header-Set
value: set-overwrites-values
- matches:
- path:
type: PathPrefix
value: /add
backendRefs:
- name: infra-backend-v1
port: 8080
filters:
- type: ResponseHeaderModifier
responseHeaderModifier:
add:
- name: X-Header-Add
value: add-appends-values
- matches:
- path:
type: PathPrefix
value: /remove
backendRefs:
- name: infra-backend-v1
port: 8080
filters:
- type: ResponseHeaderModifier
responseHeaderModifier:
remove:
- X-Header-Remove
- matches:
- path:
type: PathPrefix
value: /multiple
backendRefs:
- name: infra-backend-v1
port: 8080
filters:
- type: ResponseHeaderModifier
responseHeaderModifier:
set:
- name: X-Header-Set-1
value: header-set-1
- name: X-Header-Set-2
value: header-set-2
add:
- name: X-Header-Add-1
value: header-add-1
- name: X-Header-Add-2
value: header-add-2
- name: X-Header-Add-3
value: header-add-3
remove:
- X-Header-Remove-1
- X-Header-Remove-2
- matches:
- path:
type: PathPrefix
value: /case-insensitivity
backendRefs:
- name: infra-backend-v1
port: 8080
filters:
- type: ResponseHeaderModifier
responseHeaderModifier:
set:
- name: X-Header-Set
value: header-set
add:
- name: X-Header-Add
value: header-add
- name: x-lowercase-add
value: lowercase-add
- name: x-Mixedcase-ADD-1
value: mixedcase-add-1
- name: X-mixeDcase-add-2
value: mixedcase-add-2
- name: X-UPPERCASE-ADD
value: uppercase-add
remove:
- X-Header-Remove
Loading