From 343a0b0eb70ed32bdc55419d87022d78944ebeca Mon Sep 17 00:00:00 2001 From: Arzumify Date: Tue, 15 Oct 2024 19:40:58 +0100 Subject: [PATCH] Disable even more CORS! Nobody gets CORS! Signed-off-by: Arzumify --- services-src/auth/main.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services-src/auth/main.go b/services-src/auth/main.go index e9473f6..6957a89 100644 --- a/services-src/auth/main.go +++ b/services-src/auth/main.go @@ -355,6 +355,11 @@ func Main(information library.ServiceInitializationInformation) *chi.Mux { } router.Use(disableCors) + router.Options("*", 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-Methods", "*") + }) // Set up the static routes staticDir, err := fs.Sub(information.ResourceDir, "static")