mirror of
https://mau.dev/maunium/synapse.git
synced 2024-10-01 01:36:05 -04:00
Merge pull request #4651 from matrix-org/matthew/well-known-cors
set CORS on .well-known URI to unbreak modular
This commit is contained in:
commit
d08bac4136
1
changelog.d/4651.bugfix
Normal file
1
changelog.d/4651.bugfix
Normal file
@ -0,0 +1 @@
|
||||
Set CORS headers on .well-known requests
|
@ -18,6 +18,8 @@ import logging
|
||||
|
||||
from twisted.web.resource import Resource
|
||||
|
||||
from synapse.http.server import set_cors_headers
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@ -59,6 +61,7 @@ class WellKnownResource(Resource):
|
||||
self._well_known_builder = WellKnownBuilder(hs)
|
||||
|
||||
def render_GET(self, request):
|
||||
set_cors_headers(request)
|
||||
r = self._well_known_builder.get_well_known()
|
||||
if not r:
|
||||
request.setResponseCode(404)
|
||||
|
Loading…
Reference in New Issue
Block a user