mirror of
https://github.com/minio/minio.git
synced 2025-01-23 04:33:15 -05:00
Change default options for cors to handle HEAD and allow all headers
This commit is contained in:
parent
7df81f8707
commit
bd0436bf98
@ -120,7 +120,12 @@ func (h timeHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
// CorsHandler handler for CORS (Cross Origin Resource Sharing)
|
||||
func CorsHandler(h http.Handler) http.Handler {
|
||||
return cors.Default().Handler(h)
|
||||
c := cors.New(cors.Options{
|
||||
AllowedOrigins: []string{"*"},
|
||||
AllowedMethods: []string{"GET", "HEAD", "POST"},
|
||||
AllowedHeaders: []string{"*"},
|
||||
})
|
||||
return c.Handler(h)
|
||||
}
|
||||
|
||||
// IgnoreResourcesHandler -
|
||||
|
Loading…
x
Reference in New Issue
Block a user