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()
|
router = gin.New()
|
||||||
|
|
||||||
// Allows all origins
|
// Fix cors
|
||||||
router.Use(cors.Default())
|
configCors := cors.DefaultConfig()
|
||||||
|
configCors.AllowOrigins = []string{"https://www.pingbot.cf"}
|
||||||
|
|
||||||
|
router.Use(cors.New(configCors))
|
||||||
|
|
||||||
router.GET("/", routes.Index)
|
router.GET("/", routes.Index)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue