mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
outgoing_webhook: Set an X-Smokescreen-Role on requests.
This header is used by the Smokescreen outgoing proxy to provide identification.
This commit is contained in:
committed by
Tim Abbott
parent
bd37dc0b83
commit
134db206a9
@@ -31,7 +31,12 @@ class OutgoingWebhookServiceInterface(metaclass=abc.ABCMeta):
|
||||
self.user_profile: UserProfile = user_profile
|
||||
self.service_name: str = service_name
|
||||
self.session: Session = Session()
|
||||
self.session.headers.update({"User-Agent": "ZulipOutgoingWebhook/" + ZULIP_VERSION})
|
||||
self.session.headers.update(
|
||||
{
|
||||
"X-Smokescreen-Role": "webhook",
|
||||
"User-Agent": "ZulipOutgoingWebhook/" + ZULIP_VERSION,
|
||||
}
|
||||
)
|
||||
|
||||
@abc.abstractmethod
|
||||
def make_request(self, base_url: str, event: Dict[str, Any]) -> Optional[Response]:
|
||||
|
||||
Reference in New Issue
Block a user