From 7da5726b2794dcc10d5330ce976dd53a21313a12 Mon Sep 17 00:00:00 2001 From: Robert Fratto Date: Wed, 22 Nov 2023 09:04:47 -0500 Subject: [PATCH] misc: follow up on #5835 (#5837) * Add missing CHANGELOG entry * Mirror fix to static mode --- CHANGELOG.md | 6 ++++++ pkg/integrations/v2/app_agent_receiver/handler.go | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78652c614c94..8203fedb4b5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,12 @@ internal API changes are not present. Main (unreleased) ----------------- +### Bugfixes + +- Permit `X-Faro-Session-ID` header in CORS requests for the `faro.receiver` + component (flow mode) and the `app_agent_receiver` integration (static mode). + (@cedricziel) + v0.38.0 (2023-11-21) -------------------- diff --git a/pkg/integrations/v2/app_agent_receiver/handler.go b/pkg/integrations/v2/app_agent_receiver/handler.go index 6831885cb51b..c430e9099312 100644 --- a/pkg/integrations/v2/app_agent_receiver/handler.go +++ b/pkg/integrations/v2/app_agent_receiver/handler.go @@ -117,7 +117,7 @@ func (ar *AppAgentReceiverHandler) HTTPHandler(logger log.Logger) http.Handler { if len(ar.config.Server.CORSAllowedOrigins) > 0 { c := cors.New(cors.Options{ AllowedOrigins: ar.config.Server.CORSAllowedOrigins, - AllowedHeaders: []string{apiKeyHeader, "content-type"}, + AllowedHeaders: []string{apiKeyHeader, "content-type", "x-faro-session-id"}, }) handler = c.Handler(handler) }