From 9f3cf93538929f62dbb117bfab65d2f2789dc5b9 Mon Sep 17 00:00:00 2001 From: Andrea Fazzi Date: Wed, 3 Nov 2021 16:05:47 +0100 Subject: [PATCH] Allow origin --- backend/main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/backend/main.go b/backend/main.go index d43a15e..84f04d6 100644 --- a/backend/main.go +++ b/backend/main.go @@ -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{"*"}, }))