Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
dbf736ba
Unverified
Commit
dbf736ba
authored
6 years ago
by
Will Hunt
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Make /config more CORS-y
parent
30da50a5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/rest/media/v1/config_resource.py
+3
-1
3 additions, 1 deletion
synapse/rest/media/v1/config_resource.py
with
3 additions
and
1 deletion
synapse/rest/media/v1/config_resource.py
+
3
−
1
View file @
dbf736ba
...
...
@@ -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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment