-
Notifications
You must be signed in to change notification settings - Fork 118
Add support for ResponseHeaderModifier for HTTPRouteRule objects #1494
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
Closed
Closed
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
333df3c
Add support for ResponseHeaderModifier for HTTPRouteRule objects
kevin85421 5cf3099
refactor validateFilterHeaderModifier
kevin85421 9d8188d
Rename ValidateRequestHeader to ValidateFilterHeader
kevin85421 0241709
Rename AddHeaders to AddHeaderDirectives
kevin85421 e159b03
Update servers_template.go
kevin85421 3d7e6bf
Pass conformance tests
kevin85421 649d90e
Remove Map
kevin85421 4274622
Remove fmt.Printf
kevin85421 4bbc00f
Change TODO to FIXME
kevin85421 9fd5050
Address comments
kevin85421 95e6039
Address comments
kevin85421 629ee12
Address comments
kevin85421 bcfa113
Address comments
kevin85421 d8b35c0
Address comments
kevin85421 d316a41
Address comments
kevin85421 9bf3447
Address comments
kevin85421 5fed90d
Merge remote-tracking branch 'upstream/main' into ResponseHeaderModifier
kevin85421 33e185b
Add HTTPRouteResponseHeaderModification to the conformance tests
kevin85421 c0f98ab
Add support for ResponseHeaderModifier for HTTPRouteRule objects
kevin85421 169aa1a
Merge remote-tracking branch 'upstream/main' into ResponseHeaderModifier
kevin85421 eef6224
Add support for ResponseHeaderModifier for HTTPRouteRule objects
kevin85421 a3eaa90
Add support for ResponseHeaderModifier for HTTPRouteRule objects
kevin85421 ddfd470
Merge remote-tracking branch 'upstream/main' into ResponseHeaderModifier
kevin85421 2213a64
Add support for ResponseHeaderModifier for HTTPRouteRule objects
kevin85421 12123fb
update
kevin85421 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -582,16 +582,19 @@ func TestCreateServers(t *testing.T) { | |
Path: "@rule0-route0", | ||
ProxyPass: "http://test_foo_80$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "@rule0-route1", | ||
ProxyPass: "http://test_foo_80$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "@rule0-route2", | ||
ProxyPass: "http://test_foo_80$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "/", | ||
|
@@ -601,6 +604,7 @@ func TestCreateServers(t *testing.T) { | |
Path: "@rule1-route0", | ||
ProxyPass: "http://$test__route1_rule1$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "/test/", | ||
|
@@ -610,16 +614,19 @@ func TestCreateServers(t *testing.T) { | |
Path: "/path-only/", | ||
ProxyPass: "http://invalid-backend-ref$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "= /path-only", | ||
ProxyPass: "http://invalid-backend-ref$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "/backend-tls-policy/", | ||
ProxyPass: "https://test_btp_80$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
ProxySSLVerify: &http.ProxySSLVerify{ | ||
Name: "test-btp.example.com", | ||
TrustedCertificate: "/etc/nginx/secrets/test-btp.crt", | ||
|
@@ -629,6 +636,7 @@ func TestCreateServers(t *testing.T) { | |
Path: "= /backend-tls-policy", | ||
ProxyPass: "https://test_btp_80$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
ProxySSLVerify: &http.ProxySSLVerify{ | ||
Name: "test-btp.example.com", | ||
TrustedCertificate: "/etc/nginx/secrets/test-btp.crt", | ||
|
@@ -682,18 +690,21 @@ func TestCreateServers(t *testing.T) { | |
Rewrites: []string{"^ /replacement break"}, | ||
ProxyPass: "http://test_foo_80", | ||
ProxySetHeaders: rewriteProxySetHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "= /rewrite", | ||
Rewrites: []string{"^ /replacement break"}, | ||
ProxyPass: "http://test_foo_80", | ||
ProxySetHeaders: rewriteProxySetHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "@rule8-route0", | ||
Rewrites: []string{"^/rewrite-with-headers(.*)$ /prefix-replacement$1 break"}, | ||
ProxyPass: "http://test_foo_80", | ||
ProxySetHeaders: rewriteProxySetHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "/rewrite-with-headers/", | ||
|
@@ -733,11 +744,13 @@ func TestCreateServers(t *testing.T) { | |
Path: "= /exact", | ||
ProxyPass: "http://test_foo_80$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "@rule12-route0", | ||
ProxyPass: "http://test_foo_80$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "= /test", | ||
|
@@ -768,6 +781,7 @@ func TestCreateServers(t *testing.T) { | |
Value: "$connection_upgrade", | ||
}, | ||
}, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "= /proxy-set-headers", | ||
|
@@ -794,6 +808,7 @@ func TestCreateServers(t *testing.T) { | |
Value: "$connection_upgrade", | ||
}, | ||
}, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
} | ||
} | ||
|
@@ -900,11 +915,13 @@ func TestCreateServersConflicts(t *testing.T) { | |
Path: "/coffee/", | ||
ProxyPass: "http://test_foo_80$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "= /coffee", | ||
ProxyPass: "http://test_bar_80$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
createDefaultRootLocation(), | ||
}, | ||
|
@@ -938,11 +955,13 @@ func TestCreateServersConflicts(t *testing.T) { | |
Path: "= /coffee", | ||
ProxyPass: "http://test_foo_80$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "/coffee/", | ||
ProxyPass: "http://test_bar_80$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
createDefaultRootLocation(), | ||
}, | ||
|
@@ -986,11 +1005,13 @@ func TestCreateServersConflicts(t *testing.T) { | |
Path: "/coffee/", | ||
ProxyPass: "http://test_bar_80$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "= /coffee", | ||
ProxyPass: "http://test_baz_80$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
createDefaultRootLocation(), | ||
}, | ||
|
@@ -1095,11 +1116,13 @@ func TestCreateLocationsRootPath(t *testing.T) { | |
Path: "/path-1", | ||
ProxyPass: "http://test_foo_80$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "/path-2", | ||
ProxyPass: "http://test_foo_80$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "/", | ||
|
@@ -1117,16 +1140,19 @@ func TestCreateLocationsRootPath(t *testing.T) { | |
Path: "/path-1", | ||
ProxyPass: "http://test_foo_80$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "/path-2", | ||
ProxyPass: "http://test_foo_80$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
{ | ||
Path: "/", | ||
ProxyPass: "http://test_foo_80$request_uri", | ||
ProxySetHeaders: baseHeaders, | ||
ResponseHeaders: http.ResponseHeaders{}, | ||
}, | ||
}, | ||
}, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add some unit tests for the Let's also add to the |
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.