From 60771ba519aeee0e96970aeead8ad61c24ad419a Mon Sep 17 00:00:00 2001 From: slashexx Date: Thu, 5 Dec 2024 18:56:13 +0530 Subject: [PATCH] typo bruh Signed-off-by: slashexx --- backend/api-gateway/main.go | 2 +- backend/code-execution-service/main.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/api-gateway/main.go b/backend/api-gateway/main.go index 05d1c4a..a450ed3 100644 --- a/backend/api-gateway/main.go +++ b/backend/api-gateway/main.go @@ -14,7 +14,7 @@ type CodeRequest struct { Code string `json:"code"` } func enableCors(w http.ResponseWriter) { - w.Header().Set("Access-Control-Allow-Origin", "https://codebrewery.vercel.app") + w.Header().Set("Access-Control-Allow-Origin", "*") w.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS") w.Header().Set("Access-Control-Allow-Headers", "Content-Type, Authorization") w.Header().Set("Access-Control-Allow-Credentials", "true") // If required diff --git a/backend/code-execution-service/main.go b/backend/code-execution-service/main.go index d5407fb..0196358 100644 --- a/backend/code-execution-service/main.go +++ b/backend/code-execution-service/main.go @@ -118,9 +118,9 @@ func executeCode(language string, code string) (string, error) { cmdOutput, err := cmd.CombinedOutput() return string(cmdOutput), err } - +// https://codebrewery-api-gateway.onrender.com func enableCors(w http.ResponseWriter) { - w.Header().Set("Access-Control-Allow-Origin", "https://codebrewery-api-gateway.onrender.com") + w.Header().Set("Access-Control-Allow-Origin", "*") w.Header().Set("Access-Control-Allow-Methods", "POST, OPTIONS") w.Header().Set("Access-Control-Allow-Headers", "Content-Type") }