From 7a9af4ae67538a76e77ef3570e18fb8d963a483e Mon Sep 17 00:00:00 2001 From: Arzumify Date: Tue, 15 Oct 2024 20:12:11 +0100 Subject: [PATCH] Specify the CORS headers because it needs that for some reason on some browsers (god I hate CORS) Signed-off-by: Arzumify --- services-src/auth/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services-src/auth/main.go b/services-src/auth/main.go index 3c7ef08..756e91d 100644 --- a/services-src/auth/main.go +++ b/services-src/auth/main.go @@ -348,7 +348,7 @@ func Main(information library.ServiceInitializationInformation) *chi.Mux { disableCors := func(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Access-Control-Allow-Origin", "*") - w.Header().Set("Access-Control-Allow-Headers", "*") + w.Header().Set("Access-Control-Allow-Headers", "authorization, content-type") w.Header().Set("Access-Control-Allow-Methods", "*") next.ServeHTTP(w, r) })