Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #1021 from matrix-org/erikj/mediasecurity_policy
Browse files Browse the repository at this point in the history
Set `Content-Security-Policy` on media repo
  • Loading branch information
erikjohnston authored Aug 17, 2016
2 parents 0d7cef0 + 0af9e1a commit 2a0d8f8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions synapse/rest/media/v1/download_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def render_GET(self, request):
@request_handler()
@defer.inlineCallbacks
def _async_render_GET(self, request):
request.setHeader("Content-Security-Policy", "sandbox")
server_name, media_id, name = parse_media_id(request)
if server_name == self.server_name:
yield self._respond_local_file(request, media_id, name)
Expand Down

0 comments on commit 2a0d8f8

Please sign in to comment.