From 169bdca2bafdf419717da661e73da2176d475d26 Mon Sep 17 00:00:00 2001 From: Medzik <87065584+MedzikUser@users.noreply.github.com> Date: Sun, 22 Aug 2021 18:13:30 +0200 Subject: [PATCH] chore(cors): update cors only to pingbot.cf --- website/server.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/website/server.go b/website/server.go index f7763d9..689e3e1 100644 --- a/website/server.go +++ b/website/server.go @@ -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)