For deployment
This commit is contained in:
parent
da6188dc33
commit
cc6e4e6cb0
2 changed files with 23 additions and 25 deletions
|
|
@ -18,10 +18,10 @@ import (
|
|||
)
|
||||
|
||||
// DEV
|
||||
var connection string = "root:superuser@tcp(localhost:3306)/iips"
|
||||
// var connection string = "root:superuser@tcp(localhost:3306)/iips"
|
||||
|
||||
// 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"
|
||||
|
||||
func main() {
|
||||
connect()
|
||||
|
|
@ -40,24 +40,24 @@ func connect() {
|
|||
// router.Use(cors.Default())
|
||||
|
||||
//DEV
|
||||
router.Use(cors.New(cors.Config{
|
||||
AllowOrigins: []string{"http://localhost:5173"},
|
||||
// AllowAllOrigins: true,
|
||||
AllowMethods: []string{"GET", "POST"},
|
||||
AllowHeaders: []string{"Origin", "OCBO-ShieldConnection"},
|
||||
ExposeHeaders: []string{"Content-Length"},
|
||||
AllowCredentials: true,
|
||||
}))
|
||||
|
||||
//SERVER
|
||||
// router.Use(cors.New(cors.Config{
|
||||
// AllowOrigins: []string{"http://192.168.7.160:8080/inquiry"},
|
||||
// AllowOrigins: []string{"http://localhost:5173"},
|
||||
// // AllowAllOrigins: true,
|
||||
// AllowMethods: []string{"GET", "POST"},
|
||||
// AllowHeaders: []string{"Origin", "OCBO-ShieldConnection"},
|
||||
// ExposeHeaders: []string{"Content-Length"},
|
||||
// AllowCredentials: true,
|
||||
// }))
|
||||
|
||||
//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.StaticFile("/", "static/index.html")
|
||||
|
||||
// shield := "inquiry"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue