diff --git a/backend/main.go b/backend/main.go index 2c62899..c80aa1d 100644 --- a/backend/main.go +++ b/backend/main.go @@ -116,7 +116,15 @@ func main() { }() r := chi.NewRouter() + r.Use(middleware.Logger) + r.Use(func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + w.Header().Add("Content-Type", "application/json") + + next.ServeHTTP(w, r) + }) + }) r.Options("/*", func(w http.ResponseWriter, r *http.Request) { w.Header().Add("Access-Control-Allow-Origin", "*")