diff --git a/main.go b/main.go index fbf90bd..5928227 100644 --- a/main.go +++ b/main.go @@ -14,7 +14,7 @@ import ( func corsMiddleware(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Access-Control-Allow-Origin", "*") // Ganti * dengan origin spesifik jika perlu - w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS") + w.Header().Set("Access-Control-Allow-Methods", "GET, POST, PUT, DELETE, OPTIONS, FETCH") w.Header().Set("Access-Control-Allow-Headers", "Content-Type, Authorization") // Untuk preflight request