Removed CORS

This commit is contained in:
Patrick Alvin Alcala 2025-10-15 10:34:27 +08:00
parent 91110a92b6
commit 38acaf262a

View file

@ -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")