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

Add support for ResponseHeaderModifier for HTTPRouteRule objects #1880

Merged
merged 73 commits into from
May 14, 2024
Merged
Changes from 1 commit
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
9e69057
Add support for ResponseHeaderModifier for HTTPRouteRule objects
kevin85421 Jan 21, 2024
d440ae7
refactor validateFilterHeaderModifier
kevin85421 Jan 22, 2024
c4cbba2
Rename ValidateRequestHeader to ValidateFilterHeader
kevin85421 Jan 22, 2024
ac6281c
Rename AddHeaders to AddHeaderDirectives
kevin85421 Jan 22, 2024
51b8238
Update servers_template.go
kevin85421 Jan 22, 2024
f247e7b
Pass conformance tests
kevin85421 Feb 4, 2024
3fc4053
Remove Map
kevin85421 Feb 4, 2024
d235286
Remove fmt.Printf
kevin85421 Feb 4, 2024
712411c
Change TODO to FIXME
kevin85421 Feb 4, 2024
6559b44
Address comments
kevin85421 Feb 19, 2024
bfe683d
Address comments
kevin85421 Feb 19, 2024
d372161
Address comments
kevin85421 Feb 19, 2024
20f2600
Address comments
kevin85421 Feb 19, 2024
120420b
Address comments
kevin85421 Feb 19, 2024
e622be9
Address comments
kevin85421 Feb 19, 2024
cd777a2
Address comments
kevin85421 Feb 20, 2024
d8ce13e
Add HTTPRouteResponseHeaderModification to the conformance tests
kevin85421 Feb 20, 2024
82e1280
Add support for ResponseHeaderModifier for HTTPRouteRule objects
kevin85421 Feb 20, 2024
5cd44a1
Add support for ResponseHeaderModifier for HTTPRouteRule objects
kevin85421 Feb 25, 2024
21af9bc
Add support for ResponseHeaderModifier for HTTPRouteRule objects
kevin85421 Feb 25, 2024
2719fa4
Add support for ResponseHeaderModifier for HTTPRouteRule objects
kevin85421 Feb 25, 2024
d4f0ea5
update
kevin85421 Mar 11, 2024
381fe04
fix unit tests after rebase
salonichf5 Apr 24, 2024
387f05a
address nit comments and add unit tests
salonichf5 Apr 29, 2024
decffb3
add docs for http filters
salonichf5 May 1, 2024
7a05dbc
fix lint issues
salonichf5 May 1, 2024
152c799
add tutorial for response headers
salonichf5 May 2, 2024
8239e31
line spacing
salonichf5 May 2, 2024
7f40457
fix docs and add unit tests
salonichf5 May 2, 2024
7930761
refactor code
salonichf5 May 2, 2024
a80a7b5
Update examples/http-response-header-filter/README.md
salonichf5 May 2, 2024
b375b2a
Update examples/http-response-header-filter/README.md
salonichf5 May 2, 2024
d9c50f3
Update site/content/overview/gateway-api-compatibility.md
salonichf5 May 2, 2024
52448c4
Update site/content/overview/gateway-api-compatibility.md
salonichf5 May 2, 2024
e3362e3
Update site/content/overview/gateway-api-compatibility.md
salonichf5 May 2, 2024
6a2bd93
Update site/content/overview/gateway-api-compatibility.md
salonichf5 May 2, 2024
bc6e8ea
Update examples/http-response-header-filter/README.md
salonichf5 May 2, 2024
60c1c5d
Update examples/http-response-header-filter/README.md
salonichf5 May 2, 2024
5aabd0a
address comments
salonichf5 May 2, 2024
394a3f3
update examples for response headers
salonichf5 May 2, 2024
bd0495f
improve docs
salonichf5 May 2, 2024
579eaca
update readme
salonichf5 May 2, 2024
5627b44
add tests for code coverage
salonichf5 May 3, 2024
07539fb
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 3, 2024
c3f040a
update doc links
salonichf5 May 3, 2024
35861ad
update tutorial
salonichf5 May 6, 2024
b661b40
Update site/content/how-to/traffic-management/response-headers.md
salonichf5 May 6, 2024
292ba3a
Update site/content/how-to/traffic-management/response-headers.md
salonichf5 May 6, 2024
db13795
Update site/content/how-to/traffic-management/response-headers.md
salonichf5 May 6, 2024
6c0ae2c
Update site/content/how-to/traffic-management/response-headers.md
salonichf5 May 6, 2024
7bc9897
Update site/content/how-to/traffic-management/response-headers.md
salonichf5 May 6, 2024
f390ccc
Update site/content/how-to/traffic-management/response-headers.md
salonichf5 May 6, 2024
3aa2f23
tutorial modifications
salonichf5 May 6, 2024
112eab9
remove extras
salonichf5 May 6, 2024
9c40e3a
Update site/content/how-to/traffic-management/response-headers.md
salonichf5 May 6, 2024
3ff6015
fix repetition in doc
salonichf5 May 6, 2024
d415f25
Update site/content/how-to/traffic-management/response-headers.md
salonichf5 May 7, 2024
f3695e4
Update site/content/how-to/traffic-management/response-headers.md
salonichf5 May 7, 2024
e56b8ab
Update site/content/how-to/traffic-management/response-headers.md
salonichf5 May 7, 2024
5826d32
Update site/content/how-to/traffic-management/response-headers.md
salonichf5 May 7, 2024
1dd4c8a
Update site/content/how-to/traffic-management/response-headers.md
salonichf5 May 7, 2024
71e1881
Update site/content/how-to/traffic-management/response-headers.md
salonichf5 May 7, 2024
9fbb7de
Update internal/mode/static/nginx/config/validation/http_filters.go
salonichf5 May 7, 2024
9fcdbd3
address comments
salonichf5 May 7, 2024
241bab4
update tutorial
salonichf5 May 8, 2024
5b6df53
Update site/content/how-to/traffic-management/response-headers.md
salonichf5 May 8, 2024
a7374be
capitalize resource name
salonichf5 May 8, 2024
31b3415
capitalization of resource name
salonichf5 May 8, 2024
f802db1
Update site/content/how-to/traffic-management/response-headers.md
salonichf5 May 9, 2024
2fc154f
arrange headers for tutorial
salonichf5 May 9, 2024
268acb8
Update site/content/how-to/traffic-management/response-headers.md
salonichf5 May 14, 2024
0cbfa7b
address nit comments
salonichf5 May 14, 2024
987a368
Merge branch 'main' into feat/response-header
salonichf5 May 14, 2024
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
8 changes: 4 additions & 4 deletions site/content/how-to/traffic-management/response-headers.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ In this guide we will modify the headers for HTTP responses when client requests

## Response Header Filter
salonichf5 marked this conversation as resolved.
Show resolved Hide resolved

salonichf5 marked this conversation as resolved.
Show resolved Hide resolved
In this guide, we'll begin by configuring an app with custom headers and a straightforward httproute. We'll then observe the server response in relation to header responses. Next, we'll delve into modifying some of those headers using an httpRoute with filters to modify *response* headers. Our aim will be to verify whether the server responds with the modified headers.
In this guide, we'll begin by configuring an app with custom headers and a straightforward HTTPRoute. We'll then observe the server response in relation to header responses. Next, we'll delve into modifying some of those headers using an HTTPRoute with filters to modify *response* headers. Our aim will be to verify whether the server responds with the modified headers.
salonichf5 marked this conversation as resolved.
Show resolved Hide resolved

### Deploy the Headers application

Expand All @@ -36,7 +36,7 @@ Begin by deploying the example application `headers`. It is a simple application
kubectl apply -f https://raw.githubusercontent.com/nginxinc/nginx-gateway-fabric/v1.3.0/examples/http-response-header-filter/headers.yaml
```

salonichf5 marked this conversation as resolved.
Show resolved Hide resolved
This will create the headers service and a deployment with one pod. Run the following command to verify the resources were created:
This will create the headers Service and a Deployment with one pod. Run the following command to verify the resources were created:
salonichf5 marked this conversation as resolved.
Show resolved Hide resolved

```shell
kubectl -n default get pods
salonichf5 marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -49,7 +49,7 @@ headers-6f854c478-k9z2f 1/1 Running 0 32m

### Deploy the Gateway API Resources for the Header Application

The [gateway](https://gateway-api.sigs.k8s.io/api-types/gateway/) resource is typically deployed by the [cluster operator](https://gateway-api.sigs.k8s.io/concepts/roles-and-personas/#roles-and-personas_1). This gateway defines a single listener on port 80. Since no hostname is specified, this listener matches on all hostnames. To deploy the gateway:
The [Gateway](https://gateway-api.sigs.k8s.io/api-types/gateway/) resource is typically deployed by the [Cluster Operator](https://gateway-api.sigs.k8s.io/concepts/roles-and-personas/#roles-and-personas_1). This Gateway defines a single listener on port 80. Since no hostname is specified, this listener matches on all hostnames. To deploy the gateway:

```yaml
kubectl apply -f - <<EOF
Expand Down Expand Up @@ -95,7 +95,7 @@ EOF

This HTTPRoute has a few important properties:

- The `parentRefs` references the gateway resource that we created, and specifically defines the `http` listener to attach to, via the `sectionName` field.
- The `parentRefs` references the Gateway resource that we created, and specifically defines the `http` listener to attach to, via the `sectionName` field.
- `cafe.example.com` is the hostname that is matched for all requests to the backends defined in this HTTPRoute.
- The `match` rule defines that all requests with the path prefix `/headers` are sent to the `headers` Service.

Expand Down
Loading