Skip to content

Commit

Permalink
fix: add source id headers (frain-dev#1715)
Browse files Browse the repository at this point in the history
  • Loading branch information
danvixent authored Jul 25, 2023
1 parent 8fd2c23 commit 15444ec
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions api/ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
}
Expand Down

0 comments on commit 15444ec

Please sign in to comment.