Browse Source

fix: allow all origins (close #20)

JustSong 2 years ago
parent
commit
1dd92a3f92
1 changed files with 1 additions and 1 deletions
  1. 1 1
      middleware/cors.go

+ 1 - 1
middleware/cors.go

@@ -7,6 +7,6 @@ import (
 
 func CORS() gin.HandlerFunc {
 	config := cors.DefaultConfig()
-	config.AllowOrigins = []string{"https://one-api.vercel.app", "http://localhost:3000/"}
+	config.AllowAllOrigins = true
 	return cors.New(config)
 }