diff options
author | Erik Johnston <erikj@jki.re> | 2019-02-18 16:38:11 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-18 16:38:11 +0000 |
commit | d08bac413672ed485774e1532c3900fb23d42c41 (patch) | |
tree | 2f9cb096347bf9d5badf017302004dba564e0f0d | |
parent | Merge pull request #4667 from matrix-org/erikj/fix_revoke_guest_access_workers (diff) | |
parent | Fixup (diff) | |
download | synapse-d08bac413672ed485774e1532c3900fb23d42c41.tar.xz |
Merge pull request #4651 from matrix-org/matthew/well-known-cors
set CORS on .well-known URI to unbreak modular
-rw-r--r-- | changelog.d/4651.bugfix | 1 | ||||
-rw-r--r-- | synapse/rest/well_known.py | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/changelog.d/4651.bugfix b/changelog.d/4651.bugfix new file mode 100644 index 0000000000..15cb1e58c4 --- /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 6e043d6162..c0a4ae93e5 100644 --- a/synapse/rest/well_known.py +++ b/synapse/rest/well_known.py @@ -18,6 +18,8 @@ import logging from twisted.web.resource import Resource +from synapse.http.server import set_cors_headers + logger = logging.getLogger(__name__) @@ -59,6 +61,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) |