add delete and options methods to CORS whitelist (#3589)

This commit is contained in:
Andy Brown 2017-01-17 14:20:05 -08:00 committed by Harshavardhana
parent 09b450d610
commit 20a65981bd

View File

@ -253,7 +253,7 @@ type resourceHandler struct {
func setCorsHandler(h http.Handler) http.Handler {
c := cors.New(cors.Options{
AllowedOrigins: []string{"*"},
AllowedMethods: []string{"GET", "HEAD", "POST", "PUT"},
AllowedMethods: []string{"GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS"},
AllowedHeaders: []string{"*"},
ExposedHeaders: []string{"ETag"},
})