Skip to content

Commit

Permalink
Merge branch 'am-template-vars' of github.com:grafana/agent into am-t…
Browse files Browse the repository at this point in the history
…emplate-vars
  • Loading branch information
jcreixell committed Nov 22, 2023
2 parents f38ab1d + befdb24 commit 1391540
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ Main (unreleased)

- Agent Management: Introduce support for templated configuration. (@jcreixell)

### 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)
--------------------

Expand Down
2 changes: 1 addition & 1 deletion component/faro/receiver/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (h *handler) Update(args ServerArguments) {
if len(args.CORSAllowedOrigins) > 0 {
h.cors = cors.New(cors.Options{
AllowedOrigins: args.CORSAllowedOrigins,
AllowedHeaders: []string{apiKeyHeader, "content-type"},
AllowedHeaders: []string{apiKeyHeader, "content-type", "x-faro-session-id"},
})
} else {
h.cors = nil // Disable cors.
Expand Down
2 changes: 1 addition & 1 deletion pkg/integrations/v2/app_agent_receiver/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 1391540

Please sign in to comment.