mirror of
https://github.com/sissbruecker/linkding.git
synced 2026-02-28 06:53:12 +08:00
Use sandbox CSP for viewing assets (#1245)
This commit is contained in:
@@ -33,6 +33,7 @@ def view(request, asset_id: int):
|
||||
|
||||
response = HttpResponse(content, content_type=asset.content_type)
|
||||
response["Content-Disposition"] = f'inline; filename="{asset.download_name}"'
|
||||
response["Content-Security-Policy"] = "sandbox"
|
||||
return response
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user