diff --git a/pkg/handler/server.go b/pkg/handler/server.go index a3663ff..5fe9f77 100644 --- a/pkg/handler/server.go +++ b/pkg/handler/server.go @@ -23,9 +23,9 @@ func NewServer(db database.Database) *Server { // CORS configuration corsConfig := cors.Config{ - AllowOrigins: []string{"*"}, // List of allowed origins - AllowMethods: []string{"GET", "POST", "PUT", "DELETE"}, // List of allowed methods - + AllowOrigins: []string{"*"}, // List of allowed origins + AllowMethods: []string{"GET", "POST", "PUT", "DELETE"}, // List of allowed methods + AllowHeaders: []string{"Origin", "Content-Type", "Authorization"}, // Allow the necessary headers AllowCredentials: true, }