Skip to content

Commit

Permalink
Add early break on allowedHeaders match found (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
yyonghe authored Mar 18, 2020
1 parent 6c08711 commit d4dacab
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cors.go
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ func (c *Cors) areHeadersAllowed(requestedHeaders []string) bool {
for _, h := range c.allowedHeaders {
if h == header {
found = true
break
}
}
if !found {
Expand Down

0 comments on commit d4dacab

Please sign in to comment.