summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/cmd/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/cmd/main.go b/server/cmd/main.go
index 83a64af..b747aba 100644
--- a/server/cmd/main.go
+++ b/server/cmd/main.go
@@ -212,7 +212,7 @@ func enableCors(next http.Handler) http.Handler {
allowedOrigins := []string{"http://localhost:5173", "http://192.168.1.41:5173"}
allowedMethods := []string{"OPTIONS", "POST", "PUT"}
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- method := r.Header.Get("Method")
+ method := r.Header.Get("Access-Control-Request-Method")
if isPreflight(r) && slices.Contains(allowedMethods, method) {
w.Header().Add("Access-Control-Allow-Methods", method)
}