Skip to content

Commit 86739ba

Browse files
committed
chore: add auth headers
1 parent 30da831 commit 86739ba

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

sourceplusplus/SourcePlusPlus.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,15 @@ def __send_connected(self, eb: EventBus):
139139
for key, val in self.probe_config["spp"].get("probe_metadata").items():
140140
probe_metadata[key] = val
141141

142+
# add probe auth headers (if present)
143+
headers = {}
144+
if self.probe_config["spp"].get("authentication") is not None:
145+
for key, val in self.probe_config["spp"].get("authentication").items():
146+
headers[key] = val
147+
142148
# send probe connected event
143149
reply_address = str(uuid.uuid4())
144-
eb.send(address="spp.platform.status.probe-connected", body={
150+
eb.send(address="spp.platform.status.probe-connected", headers=headers, body={
145151
"instanceId": self.probe_config["spp"]["probe_id"],
146152
"connectionTime": round(time.time() * 1000),
147153
"meta": probe_metadata

0 commit comments

Comments
 (0)