Skip to content

Commit

Permalink
✨Added CORS depd✨
Browse files Browse the repository at this point in the history
  • Loading branch information
actualdankcoder committed Jan 21, 2022
1 parent f3855fc commit 3527f68
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3527f68

Please sign in to comment.