Skip to content

Commit

Permalink
Merge pull request #24 from tarent/adds-feature-toggle-to-white-list
Browse files Browse the repository at this point in the history
adds attribute x-feature-toggle to the whitelist
  • Loading branch information
denge90 committed Sep 1, 2016
2 parents 0cf4965 + 35f0baf commit 769795e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions composition/fetch_definition.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ var ForwardRequestHeaders = []string{
"Transfer-Encoding",
"X-Forwarded-Host",
"X-Correlation-Id",
"X-Feature-Toggle",
}

// ForwardResponseHeaders are those headers,
Expand Down
2 changes: 2 additions & 0 deletions composition/fetch_definition_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ func Test_FetchDefinition_NewFetchDefinitionFromRequest(t *testing.T) {
r.Header = http.Header{
"Content-Type": {"text/html"},
"Cookie": {"aa=bb;"},
"X-Feature-Toggle": {"true"},
"Accept-Encoding": {"gzip"}, // should not be copied
}

Expand All @@ -29,6 +30,7 @@ func Test_FetchDefinition_NewFetchDefinitionFromRequest(t *testing.T) {

a.Equal("text/html", fd.Header.Get("Content-Type"))
a.Equal("aa=bb;", fd.Header.Get("Cookie"))
a.Equal("true", fd.Header.Get("X-Feature-Toggle"))
a.Equal("", fd.Header.Get("Accept-Encoding"))

a.Equal("POST", fd.Method)
Expand Down

0 comments on commit 769795e

Please sign in to comment.