From 9c9f708e3a92118af8276c4d8ab6077579e3cdcc Mon Sep 17 00:00:00 2001 From: ybkuroki <45133652+ybkuroki@users.noreply.github.com> Date: Sat, 8 Apr 2023 09:52:18 +0900 Subject: [PATCH] Fix CORS issue on developing --- router/router.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/router/router.go b/router/router.go index af73f111..b75e7265 100644 --- a/router/router.go +++ b/router/router.go @@ -30,8 +30,9 @@ func Init(e *echo.Echo, container container.Container) { func setCORSConfig(e *echo.Echo, container container.Container) { if container.GetConfig().Extension.CorsEnabled { e.Use(middleware.CORSWithConfig(middleware.CORSConfig{ - AllowCredentials: true, - AllowOrigins: []string{"*"}, + AllowCredentials: true, + UnsafeWildcardOriginWithAllowCredentials: true, + AllowOrigins: []string{"*"}, AllowHeaders: []string{ echo.HeaderAccessControlAllowHeaders, echo.HeaderContentType,