diff options
author | Will Hunt <will@half-shot.uk> | 2018-12-09 13:27:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-09 13:27:22 +0000 |
commit | dbf736ba66fe6b530bfe3d9d503caa2e24ee8f01 (patch) | |
tree | 30f7195cc62adc424801c52cabfb502ed04208d8 /synapse/rest | |
parent | Initialise user displayname from SAML2 data (#4272) (diff) | |
download | synapse-dbf736ba66fe6b530bfe3d9d503caa2e24ee8f01.tar.xz |
Make /config more CORS-y
Diffstat (limited to 'synapse/rest')
-rw-r--r-- | synapse/rest/media/v1/config_resource.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/rest/media/v1/config_resource.py b/synapse/rest/media/v1/config_resource.py index d6605b6027..8c3adf6c64 100644 --- a/synapse/rest/media/v1/config_resource.py +++ b/synapse/rest/media/v1/config_resource.py @@ -18,7 +18,7 @@ from twisted.internet import defer from twisted.web.resource import Resource from twisted.web.server import NOT_DONE_YET -from synapse.http.server import respond_with_json, wrap_json_request_handler +from synapse.http.server import respond_with_json, wrap_json_request_handler, set_cors_headers class MediaConfigResource(Resource): @@ -40,9 +40,11 @@ class MediaConfigResource(Resource): @wrap_json_request_handler @defer.inlineCallbacks def _async_render_GET(self, request): + set_cors_headers(request) yield self.auth.get_user_by_req(request) respond_with_json(request, 200, self.limits_dict) def render_OPTIONS(self, request): + set_cors_headers(request) respond_with_json(request, 200, {}, send_cors=True) return NOT_DONE_YET |