mirror of
https://github.com/sb745/NyaaV3.git
synced 2025-12-23 12:45:46 +02:00
Allow cross origin access for RSS
Allows browser-based code to access the RSS feed without browser interrupting the connection.
This commit is contained in:
parent
4fe0ff5b1a
commit
e9cd4598d0
1 changed files with 2 additions and 0 deletions
|
|
@ -218,4 +218,6 @@ def render_rss(label, query, use_elastic, magnet_links=False):
|
||||||
response.headers['Content-Type'] = 'application/xml'
|
response.headers['Content-Type'] = 'application/xml'
|
||||||
# Cache for an hour
|
# Cache for an hour
|
||||||
response.headers['Cache-Control'] = 'max-age={}'.format(1 * 5 * 60)
|
response.headers['Cache-Control'] = 'max-age={}'.format(1 * 5 * 60)
|
||||||
|
# Allow cross origin access
|
||||||
|
response.headers['Access-Control-Allow-Origin'] = '*'
|
||||||
return response
|
return response
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue