From 6f1bc3d65b82322030c1e9cff86ef43174cb224e Mon Sep 17 00:00:00 2001 From: Dreamacro <305009791@qq.com> Date: Thu, 6 Dec 2018 10:54:45 +0800 Subject: [PATCH] Fix: add PATCH for CORS --- hub/route/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hub/route/server.go b/hub/route/server.go index d7e5334b..9ae1a347 100644 --- a/hub/route/server.go +++ b/hub/route/server.go @@ -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, })