Allow origin
This commit is contained in:
parent
91c42a6867
commit
9f3cf93538
1 changed files with 5 additions and 1 deletions
|
@ -56,7 +56,11 @@ func serveFile(c *gin.Context, filename string) error {
|
|||
func main() {
|
||||
r := gin.Default()
|
||||
r.Use(cors.New(cors.Config{
|
||||
AllowOrigins: []string{"http://localhost:8080", "http://localhost:5000"},
|
||||
AllowOrigins: []string{
|
||||
"http://localhost:8080",
|
||||
"http://localhost:5000",
|
||||
"https://yt-dls.andreafazzi.eu",
|
||||
},
|
||||
AllowCredentials: true,
|
||||
AllowHeaders: []string{"*"},
|
||||
}))
|
||||
|
|
Loading…
Reference in a new issue