瀏覽代碼

fix #33 (#34)

dalu 7 年之前
父節點
當前提交
6f0a820f94
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      cors.go

+ 1 - 1
cors.go

@@ -77,7 +77,7 @@ func (c Config) Validate() error {
 // DefaultConfig returns a generic default configuration mapped to localhost.
 func DefaultConfig() Config {
 	return Config{
-		AllowMethods:     []string{"GET", "POST", "PUT", "HEAD"},
+		AllowMethods:     []string{"GET", "POST", "PUT", "PATCH", "DELETE", "HEAD"},
 		AllowHeaders:     []string{"Origin", "Content-Length", "Content-Type"},
 		AllowCredentials: false,
 		MaxAge:           12 * time.Hour,