From 5349d74d48f8100cac8253044e4e491152494d46 Mon Sep 17 00:00:00 2001 From: ahdan15 Date: Wed, 18 Jun 2025 08:41:34 +0700 Subject: [PATCH] cors terbaru --- internal/server/routes.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/server/routes.go b/internal/server/routes.go index df67f9c..41a6d50 100644 --- a/internal/server/routes.go +++ b/internal/server/routes.go @@ -11,6 +11,7 @@ import ( func (s *Server) RegisterRoutes() http.Handler { r := gin.Default() + r.Use(cors.New(cors.Config{ AllowOrigins: []string{"*"}, // or specific domains like "http://example.com" AllowMethods: []string{"GET", "POST", "PUT", "DELETE", "OPTIONS"},