summary refs log tree commit diff
diff options
context:
space:
mode:
authorWill Hunt <will@half-shot.uk>2018-12-10 15:24:03 +0000
committerGitHub <noreply@github.com>2018-12-10 15:24:03 +0000
commit989f1167af7a393f3bc663914bbca571296028e9 (patch)
treea24bf1da6198fbdb87ea0893ee2569ca087c494a
parentMerge pull request #4283 from matrix-org/erikj/isort_df (diff)
parentMove imports to one line (diff)
downloadsynapse-989f1167af7a393f3bc663914bbca571296028e9.tar.xz
Merge pull request #4279 from matrix-org/hs/fix-config-cors
Make /config more CORS-y
-rw-r--r--changelog.d/4279.bugfix1
-rw-r--r--synapse/rest/media/v1/config_resource.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/4279.bugfix b/changelog.d/4279.bugfix
new file mode 100644
index 0000000000..12de4f44c4
--- /dev/null
+++ b/changelog.d/4279.bugfix
@@ -0,0 +1 @@
+Send CORS headers for /media/config
diff --git a/synapse/rest/media/v1/config_resource.py b/synapse/rest/media/v1/config_resource.py
index d6605b6027..77316033f7 100644
--- a/synapse/rest/media/v1/config_resource.py
+++ b/synapse/rest/media/v1/config_resource.py
@@ -41,7 +41,7 @@ class MediaConfigResource(Resource):
     @defer.inlineCallbacks
     def _async_render_GET(self, 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):
         respond_with_json(request, 200, {}, send_cors=True)