From e7029fb1a9d9d99699e986db349689f41288172a Mon Sep 17 00:00:00 2001 From: Geoffrey Ragot Date: Thu, 11 Dec 2025 14:04:44 +0100 Subject: [PATCH] fix(cors): missing allowed headers --- internal/api/router.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/api/router.go b/internal/api/router.go index 4fa3e53cb..b8bdfc2aa 100644 --- a/internal/api/router.go +++ b/internal/api/router.go @@ -2,6 +2,8 @@ package api import ( "fmt" + "net/http" + "github.com/formancehq/go-libs/v3/api" "github.com/formancehq/go-libs/v3/bun/bunpaginate" "github.com/formancehq/go-libs/v3/otlp" @@ -10,7 +12,6 @@ import ( "github.com/formancehq/ledger/internal/controller/system" "go.opentelemetry.io/otel/trace" nooptracer "go.opentelemetry.io/otel/trace/noop" - "net/http" "github.com/go-chi/chi/v5/middleware" "github.com/go-chi/cors" @@ -43,6 +44,7 @@ func NewRouter( return true }, AllowCredentials: true, + AllowedHeaders: []string{"*"}, ExposedHeaders: []string{"Count"}, }).Handler, common.LogID(),