From 15444ec907f7ab4921c4a44d241279b3e5356112 Mon Sep 17 00:00:00 2001 From: Daniel Oluojomu Date: Tue, 25 Jul 2023 17:40:24 +0100 Subject: [PATCH] fix: add source id headers (#1715) --- api/ingest.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/api/ingest.go b/api/ingest.go index 82cafa6635..e826310d12 100644 --- a/api/ingest.go +++ b/api/ingest.go @@ -2,13 +2,14 @@ package api import ( "encoding/json" - "github.com/frain-dev/convoy/internal/pkg/dedup" - "github.com/go-chi/chi/v5" - "github.com/oklog/ulid/v2" "io" "net/http" "time" + "github.com/frain-dev/convoy/internal/pkg/dedup" + "github.com/go-chi/chi/v5" + "github.com/oklog/ulid/v2" + "github.com/frain-dev/convoy" "github.com/frain-dev/convoy/config" "github.com/frain-dev/convoy/database/postgres" @@ -164,6 +165,8 @@ func (a *ApplicationHandler) IngestEvent(w http.ResponseWriter, r *http.Request) UpdatedAt: time.Now(), } + event.Headers["X-Convoy-Source-Id"] = []string{source.MaskID} + createEvent := task.CreateEvent{ Event: *event, }