diff --git a/cors.go b/cors.go index 8df21d9..e1069cb 100644 --- a/cors.go +++ b/cors.go @@ -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") @@ -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")