MCPcopy Create free account
hub / github.com/TheSecuredAnalyst/security-suite / _get_headers

Method _get_headers

modules/siem/webhook.py:55–68  ·  view source on GitHub ↗

Get request headers.

(self)

Source from the content-addressed store, hash-verified

53 def _get_headers(self) -> dict:
54 """Get request headers."""
55 headers = {
56 "Content-Type": "application/json",
57 **self.custom_headers,
58 }
59
60 if self.auth_token:
61 if self.format == "pagerduty":
62 headers["Authorization"] = f"Token token={self.auth_token}"
63 else:
64 headers[self.auth_header] = f"Bearer {self.auth_token}"
65
66 return headers
67
68 def _format_payload(self, event: SIEMEvent) -> dict:
69 """Format event payload based on target format."""
70 if self.format == "slack":
71 return self._format_slack(event)

Callers 2

exportMethod · 0.95
test_connectionMethod · 0.95

Calls

no outgoing calls

Tested by 1

test_connectionMethod · 0.76