mirror of https://github.com/MedzikUser/go-pingbot
chore(cors): update cors only to pingbot.cf
This commit is contained in:
parent
a350ed7dee
commit
169bdca2ba
|
@ -20,8 +20,11 @@ func Server() {
|
|||
|
||||
router = gin.New()
|
||||
|
||||
// Allows all origins
|
||||
router.Use(cors.Default())
|
||||
// Fix cors
|
||||
configCors := cors.DefaultConfig()
|
||||
configCors.AllowOrigins = []string{"https://www.pingbot.cf"}
|
||||
|
||||
router.Use(cors.New(configCors))
|
||||
|
||||
router.GET("/", routes.Index)
|
||||
|
||||
|
|
Loading…
Reference in New Issue