From ab8df5f3da7eba8fadfaa7fdcbd0447b64a9464d Mon Sep 17 00:00:00 2001 From: Zed Date: Wed, 1 Apr 2020 11:48:25 +0800 Subject: [PATCH] fix: add `Authorization` to CORS Allowed Headers --- backend/cors_middleware.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/cors_middleware.go b/backend/cors_middleware.go index f62eaa9..8f90187 100644 --- a/backend/cors_middleware.go +++ b/backend/cors_middleware.go @@ -10,7 +10,7 @@ func CorsMiddleware() gin.HandlerFunc { return cors.New(cors.Config{ //AllowOrigins: []string{"http://localhost:3000", "http://192.168.50.196:3000"}, AllowMethods: []string{"PUT", "PATCH", "POST", "GET", "OPTIONS"}, - AllowHeaders: []string{"Origin", "Content-Type"}, + AllowHeaders: []string{"Origin", "Content-Type", "Authorization"}, ExposeHeaders: []string{"Content-Length"}, AllowCredentials: true, AllowAllOrigins: true,