From 9e38981ae47d03467a954c3c540c51b567f6e50b Mon Sep 17 00:00:00 2001 From: aphrodite Date: Mon, 4 Jun 2018 14:24:28 +0000 Subject: [PATCH] Send HTTP pushes direct to http-priv rather than via clouldflare (This is a heinous hack that ought to be made more generic and pushed back to develop) --- synapse/push/httppusher.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py index bf7ff74a1a52..e0ccbfa360fa 100644 --- a/synapse/push/httppusher.py +++ b/synapse/push/httppusher.py @@ -329,7 +329,12 @@ def dispatch_push(self, event, tweaks, badge): if not notification_dict: defer.returnValue([]) try: - resp = yield self.http_client.post_json_get_json(self.url, notification_dict) + url = self.url.replace( + "https://matrix.org/_matrix/push/v1/notify", + "http://http-priv.matrix.org/_matrix/push/v1/notify", + ) + + resp = yield self.http_client.post_json_get_json(url, notification_dict) except Exception: logger.warn( "Failed to push event %s to %s",