cors terbaru

This commit is contained in:
2025-06-18 08:41:34 +07:00
parent ca9a8fc877
commit 5349d74d48
+1
View File
@@ -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"},