summary refs log tree commit diff
path: root/synapse/rest/media/v1/config_resource.py
diff options
context:
space:
mode:
authorWill Hunt <will@half-shot.uk>2018-12-10 13:11:37 +0000
committerGitHub <noreply@github.com>2018-12-10 13:11:37 +0000
commit466c1f3e010c35ecdf1ec6dba181c42cfb94e899 (patch)
tree1f985d665d550615808c9bb0a5f6074be334644e /synapse/rest/media/v1/config_resource.py
parentchangelog & isort (diff)
downloadsynapse-466c1f3e010c35ecdf1ec6dba181c42cfb94e899.tar.xz
Use `send_cors`
Diffstat (limited to 'synapse/rest/media/v1/config_resource.py')
-rw-r--r--synapse/rest/media/v1/config_resource.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/synapse/rest/media/v1/config_resource.py b/synapse/rest/media/v1/config_resource.py
index 9b97da2132..502d1761de 100644
--- a/synapse/rest/media/v1/config_resource.py
+++ b/synapse/rest/media/v1/config_resource.py
@@ -20,7 +20,6 @@ from twisted.web.server import NOT_DONE_YET
 
 from synapse.http.server import (
     respond_with_json,
-    set_cors_headers,
     wrap_json_request_handler,
 )
 
@@ -44,11 +43,9 @@ 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)
+        respond_with_json(request, 200, self.limits_dict, send_cors=True)
 
     def render_OPTIONS(self, request):
-        set_cors_headers(request)
         respond_with_json(request, 200, {}, send_cors=True)
         return NOT_DONE_YET