Update api.go

This commit is contained in:
Sergey Krashevich
2023-01-20 18:38:46 +03:00
committed by GitHub
parent f0def68482
commit a36359f3dd

View File

@@ -118,6 +118,7 @@ func middlewareCORS(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Access-Control-Allow-Origin", "*")
w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS")
w.Header().Set("Access-Control-Allow-Headers", "Authorization")
next.ServeHTTP(w, r)
})
}