From eb490c8b21f011b2194c860afdd44a287d051142 Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Tue, 31 Jan 2023 23:39:05 -0300 Subject: [PATCH] add vite preview port --- backend/middlewares/cors.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/middlewares/cors.go b/backend/middlewares/cors.go index 3c85eaf..d171ee1 100644 --- a/backend/middlewares/cors.go +++ b/backend/middlewares/cors.go @@ -9,7 +9,7 @@ func Cors(handler http.Handler) http.Handler { origin := request.Header.Get("Origin") switch origin { - case "http://localhost:5173", "http://localhost", "https://alai.cromer.cl": + case "http://localhost:5173", "http://localhost:4173", "http://localhost", "https://alai.cromer.cl": writer.Header().Set("Access-Control-Allow-Origin", origin) writer.Header().Set("Access-Control-Allow-Methods", "GET,HEAD,OPTIONS,POST,PUT,DELETE,PATCH") writer.Header().Set("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Authorization")