Skip to content

Commit f1598b4

Browse files
authoredJul 5, 2023
Add response_header_modifier outbound http filter (#251)
The `responseHeaderModifier` filter is an Extended level feature: https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io%2fv1beta1.HTTPRouteFilter We add this filter to the outbound proxy-api. Signed-off-by: Alex Leong <alex@buoyant.io>
1 parent 07f41de commit f1598b4

File tree

6 files changed

+594
-431
lines changed

6 files changed

+594
-431
lines changed
 

‎go/http_route/http_route.pb.go

+180-83
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎go/outbound/outbound.pb.go

+371-347
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎proto/http_route.proto

+18
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,24 @@ message RequestHeaderModifier {
8484
repeated string remove = 3;
8585
}
8686

87+
// Configures a route to modify a response's headers.
88+
//
89+
// Modifications are to be applied in the order they are described here:
90+
// additions apply first, then sets, and then removals.
91+
message ResponseHeaderModifier {
92+
// A list of headers name-value pairs to set on responses, augmenting any
93+
// existing values for the header.
94+
io.linkerd.proxy.http_types.Headers add = 1;
95+
96+
// A list of headers name-value pairs to set on responses, replacing any
97+
// existing values for the header.
98+
io.linkerd.proxy.http_types.Headers set = 2;
99+
100+
// A list of headers names to be removed from responses.
101+
repeated string remove = 3;
102+
}
103+
104+
87105
// Configures a route to respond with a redirect response. The `location` header
88106
// is set with the given URL parameters.
89107
message RequestRedirect {

‎proto/outbound.proto

+1
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ message HttpRoute {
125125
io.linkerd.proxy.http_route.HttpFailureInjector failure_injector = 1;
126126
io.linkerd.proxy.http_route.RequestHeaderModifier request_header_modifier = 2;
127127
io.linkerd.proxy.http_route.RequestRedirect redirect = 3;
128+
io.linkerd.proxy.http_route.ResponseHeaderModifier response_header_modifier = 4;
128129
}
129130
}
130131

‎src/gen/io.linkerd.proxy.http_route.rs

+19
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/gen/io.linkerd.proxy.outbound.rs

+5-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
Please sign in to comment.