forked from MirrorHub/synapse
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
2 changed files with 4 additions and 0 deletions
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 a new issue