mirror of https://github.com/miniflux/v2.git
Reduce number of preflight check to save network brandwidth
This commit is contained in:
parent
a6e9f88e7a
commit
cdeb2a8fc0
|
@ -27,6 +27,7 @@ func (m *middleware) handleCORS(next http.Handler) http.Handler {
|
|||
w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS")
|
||||
w.Header().Set("Access-Control-Allow-Headers", "X-Auth-Token")
|
||||
if r.Method == http.MethodOptions {
|
||||
w.Header().Set("Access-Control-Max-Age", "3600")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue