Allow cross origin access for .torrent files

This commit is contained in:
Cas 2021-10-12 21:04:11 +02:00
parent e9cd4598d0
commit 146e629895

View file

@ -332,6 +332,8 @@ def download_torrent(torrent_id):
resp.headers['Content-Type'] = 'application/x-bittorrent' resp.headers['Content-Type'] = 'application/x-bittorrent'
resp.headers['Content-Disposition'] = disposition resp.headers['Content-Disposition'] = disposition
resp.headers['Content-Length'] = torrent_file_size resp.headers['Content-Length'] = torrent_file_size
# Allow cross origin access
resp.headers['Access-Control-Allow-Origin'] = '*'
return resp return resp