Removed CORS
This commit is contained in:
parent
91110a92b6
commit
38acaf262a
1 changed files with 9 additions and 8 deletions
|
|
@ -12,7 +12,7 @@ import (
|
||||||
// "errors"
|
// "errors"
|
||||||
// "os"
|
// "os"
|
||||||
|
|
||||||
"github.com/gin-contrib/cors"
|
// "github.com/gin-contrib/cors"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
_ "github.com/go-sql-driver/mysql"
|
_ "github.com/go-sql-driver/mysql"
|
||||||
)
|
)
|
||||||
|
|
@ -50,13 +50,14 @@ func connect() {
|
||||||
// }))
|
// }))
|
||||||
|
|
||||||
//SERVER
|
//SERVER
|
||||||
router.Use(cors.New(cors.Config{
|
// router.Use(cors.New(cors.Config{
|
||||||
AllowOrigins: []string{"http://192.168.7.160:8080/esign"},
|
// // AllowOrigins: []string{"http://192.168.7.160:8080/esign"},
|
||||||
AllowMethods: []string{"GET", "POST"},
|
// AllowAllOrigins: true,
|
||||||
AllowHeaders: []string{"Origin", "OCBO-ShieldConnection"},
|
// AllowMethods: []string{"GET", "POST"},
|
||||||
ExposeHeaders: []string{"Content-Length"},
|
// AllowHeaders: []string{"Origin", "OCBO-ShieldConnection"},
|
||||||
AllowCredentials: true,
|
// ExposeHeaders: []string{"Content-Length"},
|
||||||
}))
|
// AllowCredentials: true,
|
||||||
|
// }))
|
||||||
|
|
||||||
router.StaticFile("/", "static/index.html")
|
router.StaticFile("/", "static/index.html")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue