Add GET,DELETE and remove redundant OPTIONS from Access-Control-Allow-Headers
This commit is contained in:
parent
a48cf931ae
commit
04ff76f0ac
|
@ -145,7 +145,7 @@ func (handler *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
if r.Method == "OPTIONS" {
|
||||
// Preflight request
|
||||
header.Set("Access-Control-Allow-Methods", "POST, HEAD, PATCH, OPTIONS")
|
||||
header.Set("Access-Control-Allow-Methods", "POST, GET, HEAD, PATCH, DELETE")
|
||||
header.Set("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Upload-Length, Upload-Offset, Tus-Resumable, Upload-Metadata")
|
||||
header.Set("Access-Control-Max-Age", "86400")
|
||||
|
||||
|
|
Loading…
Reference in New Issue