Skip to content

Commit

Permalink
Merge pull request #16 from techno-tanoC/fix-cors
Browse files Browse the repository at this point in the history
fix cors
  • Loading branch information
techno-tanoC authored Apr 5, 2021
2 parents 114607e + c3598e1 commit 3ee6069
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func main() {
downloader := NewDownloader(client, storage, 1000, 1000)

r := gin.Default()
r.Use(cors.Default())

r.GET("/downloads", func(c *gin.Context) {
items := downloader.table.ToItems()
Expand All @@ -50,6 +51,5 @@ func main() {
c.JSON(http.StatusNoContent, gin.H{})
})

r.Use(cors.Default())
r.Run()
}

0 comments on commit 3ee6069

Please sign in to comment.