diff --git a/changelog.d/4651.bugfix b/changelog.d/4651.bugfix new file mode 100644 index 000000000000..15cb1e58c4e5 --- /dev/null +++ b/changelog.d/4651.bugfix @@ -0,0 +1 @@ +Set CORS headers on .well-known requests diff --git a/synapse/rest/well_known.py b/synapse/rest/well_known.py index 6e043d616230..c0a4ae93e53f 100644 --- a/synapse/rest/well_known.py +++ b/synapse/rest/well_known.py @@ -18,6 +18,8 @@ from twisted.web.resource import Resource +from synapse.http.server import set_cors_headers + logger = logging.getLogger(__name__) @@ -59,6 +61,7 @@ def __init__(self, hs): 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)