Fix: add PATCH for CORS

This commit is contained in:
Dreamacro 2018-12-06 10:54:45 +08:00
parent 2b93c9d4c9
commit 6f1bc3d65b

View File

@ -36,7 +36,7 @@ func Start(addr string, secret string) {
cors := cors.New(cors.Options{
AllowedOrigins: []string{"*"},
AllowedMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},
AllowedMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
AllowedHeaders: []string{"Content-Type", "Authorization"},
MaxAge: 300,
})