From 38acaf262aaa48adf488003d82eca5c14ce32ef2 Mon Sep 17 00:00:00 2001 From: Patrick Alvin Alcala Date: Wed, 15 Oct 2025 10:34:27 +0800 Subject: [PATCH] Removed CORS --- backend/main.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/backend/main.go b/backend/main.go index 67bb890..c1c0549 100644 --- a/backend/main.go +++ b/backend/main.go @@ -12,7 +12,7 @@ import ( // "errors" // "os" - "github.com/gin-contrib/cors" + // "github.com/gin-contrib/cors" "github.com/gin-gonic/gin" _ "github.com/go-sql-driver/mysql" ) @@ -50,13 +50,14 @@ func connect() { // })) //SERVER - router.Use(cors.New(cors.Config{ - AllowOrigins: []string{"http://192.168.7.160:8080/esign"}, - AllowMethods: []string{"GET", "POST"}, - AllowHeaders: []string{"Origin", "OCBO-ShieldConnection"}, - ExposeHeaders: []string{"Content-Length"}, - AllowCredentials: true, - })) + // router.Use(cors.New(cors.Config{ + // // AllowOrigins: []string{"http://192.168.7.160:8080/esign"}, + // AllowAllOrigins: true, + // AllowMethods: []string{"GET", "POST"}, + // AllowHeaders: []string{"Origin", "OCBO-ShieldConnection"}, + // ExposeHeaders: []string{"Content-Length"}, + // AllowCredentials: true, + // })) router.StaticFile("/", "static/index.html")