mirror of
https://github.com/sb745/NyaaV3.git
synced 2025-12-23 04:35:45 +02:00
Allow cross origin access for RSS
Merge pull request #10 from Kirdow/master
This commit is contained in:
commit
42ec86b8d7
2 changed files with 4 additions and 0 deletions
|
|
@ -219,4 +219,6 @@ def render_rss(label, query, use_elastic, magnet_links=False):
|
|||
response.headers['Content-Type'] = 'application/xml'
|
||||
# Cache for an hour
|
||||
response.headers['Cache-Control'] = 'max-age={}'.format(1 * 5 * 60)
|
||||
# Allow cross origin access
|
||||
response.headers['Access-Control-Allow-Origin'] = '*'
|
||||
return response
|
||||
|
|
|
|||
|
|
@ -333,6 +333,8 @@ def download_torrent(torrent_id):
|
|||
resp.headers['Content-Type'] = 'application/x-bittorrent'
|
||||
resp.headers['Content-Disposition'] = disposition
|
||||
resp.headers['Content-Length'] = torrent_file_size
|
||||
# Allow cross origin access
|
||||
resp.headers['Access-Control-Allow-Origin'] = '*'
|
||||
return resp
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue