Skip to content

Commit

Permalink
Make filtering allowed headers case-insensitive, wildcards
Browse files Browse the repository at this point in the history
  • Loading branch information
dragarthPl committed Feb 14, 2020
1 parent 6b23af8 commit c46ed7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ All notable changes to `knotx-repository-connector` will be documented in this f

## Unreleased
List of changes that are finished but not yet released in any final version.
- [PR-10](https://github.com/Knotx/knotx-repository-connector/pull/10) - Make filtering allowed headers case-insensitive

## 2.1.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ private MultiMap buildHeaders(String hostHeader, MultiMap headers) {

private MultiMap filteredHeaders(MultiMap headers) {
return headers.names().stream()
.filter(AllowedHeadersFilter.create(configuration.getAllowedRequestHeadersPatterns()))
.filter(AllowedHeadersFilter.WildcardCaseInsensitive.create(configuration.getAllowedRequestHeaders()))
.collect(MultiMapCollector.toMultiMap(o -> o, headers::getAll));
}

Expand Down

0 comments on commit c46ed7c

Please sign in to comment.