Defaulted to localhost
This commit is contained in:
parent
3391e4ff87
commit
11e572c414
1 changed files with 15 additions and 15 deletions
|
|
@ -18,12 +18,12 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
// DEV
|
// DEV
|
||||||
// var connection string = "root:superuser@tcp(localhost:3306)/iips"
|
var connection string = "root:superuser@tcp(localhost:3306)/iips"
|
||||||
// var connectionPops string = "root:superuser@tcp(localhost:3306)/pops"
|
var connectionPops string = "root:superuser@tcp(localhost:3306)/pops"
|
||||||
|
|
||||||
// SERVER
|
// SERVER
|
||||||
var connection string = "iips:iipsuser@tcp(192.168.7.100:3306)/iips"
|
// var connection string = "iips:iipsuser@tcp(192.168.7.100:3306)/iips"
|
||||||
var connectionPops string = "pops:Pops2023!@tcp(192.168.76.10:3306)/pops"
|
// var connectionPops string = "pops:Pops2023!@tcp(192.168.76.10:3306)/pops"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
connect()
|
connect()
|
||||||
|
|
@ -44,23 +44,23 @@ func connect() {
|
||||||
router.Use(cors.Default())
|
router.Use(cors.Default())
|
||||||
|
|
||||||
//DEV
|
//DEV
|
||||||
// router.Use(cors.New(cors.Config{
|
|
||||||
// AllowOrigins: []string{"http://localhost:5173"},
|
|
||||||
// AllowMethods: []string{"GET", "POST"},
|
|
||||||
// AllowHeaders: []string{"Origin", "OCBO-ShieldConnection"},
|
|
||||||
// ExposeHeaders: []string{"Content-Length"},
|
|
||||||
// AllowCredentials: true,
|
|
||||||
// }))
|
|
||||||
|
|
||||||
//SERVER
|
|
||||||
router.Use(cors.New(cors.Config{
|
router.Use(cors.New(cors.Config{
|
||||||
AllowAllOrigins: true,
|
AllowOrigins: []string{"http://localhost:5173"},
|
||||||
AllowMethods: []string{"GET", "POST"},
|
AllowMethods: []string{"GET", "POST"},
|
||||||
AllowHeaders: []string{"Origin"},
|
AllowHeaders: []string{"Origin", "OCBO-ShieldConnection"},
|
||||||
ExposeHeaders: []string{"Content-Length"},
|
ExposeHeaders: []string{"Content-Length"},
|
||||||
AllowCredentials: true,
|
AllowCredentials: true,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
//SERVER
|
||||||
|
// router.Use(cors.New(cors.Config{
|
||||||
|
// AllowAllOrigins: true,
|
||||||
|
// AllowMethods: []string{"GET", "POST"},
|
||||||
|
// AllowHeaders: []string{"Origin"},
|
||||||
|
// ExposeHeaders: []string{"Content-Length"},
|
||||||
|
// AllowCredentials: true,
|
||||||
|
// }))
|
||||||
|
|
||||||
router.StaticFile("/", "static/index.html")
|
router.StaticFile("/", "static/index.html")
|
||||||
|
|
||||||
// shield := "inquiry"
|
// shield := "inquiry"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue