mirror of
https://github.com/pgsty/minio.git
synced 2026-08-08 15:23:29 +03:00
CORS: cors handling should be before auth handling. cors should allow PUT.
This commit is contained in:
+1
-1
@@ -126,7 +126,7 @@ func (h timeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
func CorsHandler(h http.Handler) http.Handler {
|
||||
c := cors.New(cors.Options{
|
||||
AllowedOrigins: []string{"*"},
|
||||
AllowedMethods: []string{"GET", "HEAD", "POST"},
|
||||
AllowedMethods: []string{"GET", "HEAD", "POST", "PUT"},
|
||||
AllowedHeaders: []string{"*"},
|
||||
})
|
||||
return c.Handler(h)
|
||||
|
||||
Reference in New Issue
Block a user