From 04fdd064f2eeac0a8aef3d4aa0d7db4a8bbeffea Mon Sep 17 00:00:00 2001 From: fdemir Date: Tue, 23 Jan 2024 03:50:16 +0300 Subject: [PATCH] fix: allow post and delete --- handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handler.go b/handler.go index 635e7e9..84f5aeb 100644 --- a/handler.go +++ b/handler.go @@ -13,7 +13,7 @@ func HandleBase(w http.ResponseWriter, r *http.Request, s *Source, opt *ServeOpt } w.Header().Set("Content-Type", "application/json") - w.Header().Set("Access-Control-Allow-Methods", "GET") + w.Header().Set("Access-Control-Allow-Methods", "GET, POST, DELETE") if !opt.noCors { w.Header().Set("Access-Control-Allow-Origin", "*")