Skip to content

Commit

Permalink
Set headers instead of adding them (#39)
Browse files Browse the repository at this point in the history
Using `Header.Add()` might result in duplicate headers. With the used
headers there is no case where this might be valid. Instead we should
overwrite duplicates using `Header.Set()`.
  • Loading branch information
hashworks authored and unrolled committed Sep 14, 2018
1 parent 8287f38 commit 9707245
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion secure.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func (s *Secure) Process(w http.ResponseWriter, r *http.Request) error {
if responseHeader != nil {
for key, values := range responseHeader {
for _, value := range values {
w.Header().Add(key, value)
w.Header().Set(key, value)
}
}
}
Expand Down

0 comments on commit 9707245

Please sign in to comment.