Skip to content

Commit

Permalink
Give request headers to the cloud event handler context (#283)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcnghia authored Apr 18, 2024
1 parent 6278791 commit e845334
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/cloudevent-broker/cmd/ingress/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ func main() {
go httpmetrics.ServeMetrics()
httpmetrics.SetupTracer(ctx)

c, err := mce.NewClientHTTP(cloudevents.WithPort(env.Port))
c, err := mce.NewClientHTTP(cloudevents.WithPort(env.Port),
cehttp.WithRequestDataAtContextMiddleware() /* give request headers to the handler context */)
if err != nil {
clog.Fatalf("failed to create CE client, %v", err)
}
Expand Down

0 comments on commit e845334

Please sign in to comment.