mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-27 14:39:23 -05:00
Merge pull request #1021 from matrix-org/erikj/mediasecurity_policy
Set `Content-Security-Policy` on media repo
This commit is contained in:
commit
2a0d8f8219
@ -45,6 +45,7 @@ class DownloadResource(Resource):
|
|||||||
@request_handler()
|
@request_handler()
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def _async_render_GET(self, request):
|
def _async_render_GET(self, request):
|
||||||
|
request.setHeader("Content-Security-Policy", "sandbox")
|
||||||
server_name, media_id, name = parse_media_id(request)
|
server_name, media_id, name = parse_media_id(request)
|
||||||
if server_name == self.server_name:
|
if server_name == self.server_name:
|
||||||
yield self._respond_local_file(request, media_id, name)
|
yield self._respond_local_file(request, media_id, name)
|
||||||
|
Loading…
Reference in New Issue
Block a user