From 3527f686c59844367ad9f4de8c0a4a010b218273 Mon Sep 17 00:00:00 2001 From: actualdankcoder Date: Fri, 21 Jan 2022 17:49:17 +0530 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8Added=20CORS=20depd=E2=9C=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server.go b/server.go index 6ef706d..7d70047 100644 --- a/server.go +++ b/server.go @@ -2,10 +2,12 @@ package main import ( "github.com/gin-gonic/gin" + "github.com/gin-contrib/cors" ) func RunServer() { r := gin.Default() + r.Use(cors.Default()) r.GET("/", func(c *gin.Context) { dat := LoadJSON() c.IndentedJSON(200, dat)