diff --git a/db/blip_handler.go b/db/blip_handler.go index 4fa0478013..7f116753c6 100644 --- a/db/blip_handler.go +++ b/db/blip_handler.go @@ -76,6 +76,8 @@ func newBlipHandler(ctx context.Context, bc *BlipSyncContext, db *Database, seri type BLIPSyncContextClientType string const ( + BLIPCorrelationIDResponseHeader = "X-Correlation-ID" + BLIPSyncClientTypeQueryParam = "client" BLIPClientTypeCBL2 BLIPSyncContextClientType = "cbl2" diff --git a/rest/blip_sync.go b/rest/blip_sync.go index 7a50299557..6c1d072c74 100644 --- a/rest/blip_sync.go +++ b/rest/blip_sync.go @@ -48,6 +48,7 @@ func (h *handler) handleBLIPSync() error { // Overwrite the existing logging context with the blip context ID h.rqCtx = base.CorrelationIDLogCtx(h.ctx(), base.FormatBlipContextID(blipContext.ID)) + h.response.Header().Set(db.BLIPCorrelationIDResponseHeader, blipContext.ID) // Create a new BlipSyncContext attached to the given blipContext. ctx := db.NewBlipSyncContext(h.rqCtx, blipContext, h.db, h.formatSerialNumber(), db.BlipSyncStatsForCBL(h.db.DbStats))