mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-17 08:38:24 +00:00
fix: allow all origins (close #20)
This commit is contained in:
@@ -7,6 +7,6 @@ import (
|
|||||||
|
|
||||||
func CORS() gin.HandlerFunc {
|
func CORS() gin.HandlerFunc {
|
||||||
config := cors.DefaultConfig()
|
config := cors.DefaultConfig()
|
||||||
config.AllowOrigins = []string{"https://one-api.vercel.app", "http://localhost:3000/"}
|
config.AllowAllOrigins = true
|
||||||
return cors.New(config)
|
return cors.New(config)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user