0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-14 21:53:50 +01:00

Merge pull request #4279 from matrix-org/hs/fix-config-cors

Make /config more CORS-y
This commit is contained in:
Will Hunt 2018-12-10 15:24:03 +00:00 committed by GitHub
commit 989f1167af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/4279.bugfix Normal file
View file

@ -0,0 +1 @@
Send CORS headers for /media/config

View file

@ -41,7 +41,7 @@ class MediaConfigResource(Resource):
@defer.inlineCallbacks @defer.inlineCallbacks
def _async_render_GET(self, request): def _async_render_GET(self, request):
yield self.auth.get_user_by_req(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): def render_OPTIONS(self, request):
respond_with_json(request, 200, {}, send_cors=True) respond_with_json(request, 200, {}, send_cors=True)