From 6f47bc3fb2b5617b4355c9c81649d7feb09b790a Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Thu, 14 Feb 2019 19:51:33 +0000 Subject: set CORS on .well-known URI to unbreak modular otherwise a riot/web running on foo.riot.im can't query the .well-known on foo.modular.im... --- synapse/rest/well_known.py | 1 + 1 file changed, 1 insertion(+) (limited to 'synapse') diff --git a/synapse/rest/well_known.py b/synapse/rest/well_known.py index 6e043d6162..41d868c6d2 100644 --- a/synapse/rest/well_known.py +++ b/synapse/rest/well_known.py @@ -59,6 +59,7 @@ class WellKnownResource(Resource): self._well_known_builder = WellKnownBuilder(hs) def render_GET(self, request): + set_cors_headers(request) r = self._well_known_builder.get_well_known() if not r: request.setResponseCode(404) -- cgit 1.4.1 From bfcefbb230ee5a50d57a03d3d021c476ca4663d8 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Thu, 14 Feb 2019 19:53:12 +0000 Subject: tabs --- synapse/rest/well_known.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'synapse') diff --git a/synapse/rest/well_known.py b/synapse/rest/well_known.py index 41d868c6d2..d2e500d564 100644 --- a/synapse/rest/well_known.py +++ b/synapse/rest/well_known.py @@ -59,7 +59,7 @@ class WellKnownResource(Resource): self._well_known_builder = WellKnownBuilder(hs) def render_GET(self, request): - set_cors_headers(request) + set_cors_headers(request) r = self._well_known_builder.get_well_known() if not r: request.setResponseCode(404) -- cgit 1.4.1 From 04dad5ac16b1776a8a55f9b56193d639e1b9f01a Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Mon, 18 Feb 2019 15:59:23 +0100 Subject: fix missig import --- synapse/rest/well_known.py | 1 + 1 file changed, 1 insertion(+) (limited to 'synapse') diff --git a/synapse/rest/well_known.py b/synapse/rest/well_known.py index d2e500d564..0d270de8bb 100644 --- a/synapse/rest/well_known.py +++ b/synapse/rest/well_known.py @@ -17,6 +17,7 @@ import json import logging from twisted.web.resource import Resource +from synapse.http.server import set_cors_headers logger = logging.getLogger(__name__) -- cgit 1.4.1 From 092b541401e7ca6a97ab8c659de54ced423ec779 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 18 Feb 2019 15:52:26 +0000 Subject: Fixup --- changelog.d/4651.bugfix | 2 +- synapse/rest/well_known.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'synapse') diff --git a/changelog.d/4651.bugfix b/changelog.d/4651.bugfix index 2f8d19e0c0..15cb1e58c4 100644 --- a/changelog.d/4651.bugfix +++ b/changelog.d/4651.bugfix @@ -1 +1 @@ -set CORS headers on .well-known requests +Set CORS headers on .well-known requests diff --git a/synapse/rest/well_known.py b/synapse/rest/well_known.py index 0d270de8bb..c0a4ae93e5 100644 --- a/synapse/rest/well_known.py +++ b/synapse/rest/well_known.py @@ -17,6 +17,7 @@ import json import logging from twisted.web.resource import Resource + from synapse.http.server import set_cors_headers logger = logging.getLogger(__name__) -- cgit 1.4.1