Skip to content

Commit

Permalink
Update preflight response status to http.StatusNoContent (204) (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
sc0Vu committed Jun 19, 2020
1 parent d4dacab commit be1c7e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cors.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func (c *Cors) Handler(h http.Handler) http.Handler {
if c.optionPassthrough {
h.ServeHTTP(w, r)
} else {
w.WriteHeader(http.StatusOK)
w.WriteHeader(http.StatusNoContent)
}
} else {
c.logf("Handler: Actual request")
Expand Down Expand Up @@ -244,7 +244,7 @@ func (c *Cors) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.Handl
if c.optionPassthrough {
next(w, r)
} else {
w.WriteHeader(http.StatusOK)
w.WriteHeader(http.StatusNoContent)
}
} else {
c.logf("ServeHTTP: Actual request")
Expand Down

0 comments on commit be1c7e1

Please sign in to comment.