chore(cors): update cors only to pingbot.cf

This commit is contained in:
Medzik 2021-08-22 18:13:30 +02:00
parent a350ed7dee
commit 169bdca2ba
1 changed files with 5 additions and 2 deletions

View File

@ -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)