Skip to content

Commit

Permalink
Add Vary header when allowedOrigins is * (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
Calpicow authored and elithrar committed Apr 16, 2018
1 parent c5874fa commit 9327cfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cors.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (ch *cors) ServeHTTP(w http.ResponseWriter, r *http.Request) {
w.Header().Set(corsAllowCredentialsHeader, "true")
}

if len(ch.allowedOrigins) > 1 {
if len(ch.allowedOrigins) > 1 || ch.allowedOrigins[0] == corsOriginMatchAll {
w.Header().Set(corsVaryHeader, corsOriginHeader)
}

Expand Down

0 comments on commit 9327cfd

Please sign in to comment.