From 8924636b5376f0ad9711f3024554e38dc236f13e Mon Sep 17 00:00:00 2001 From: teddy Date: Thu, 8 May 2025 16:57:25 +0700 Subject: [PATCH] update\ --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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