mirror of
https://github.com/searxng/searxng.git
synced 2025-08-02 01:52:21 +02:00
[fix] limiter: prevent caching of token link
Depending on server and client setup, this CSS link with empty content may be cached. For example, in my setup CloudFlare automatically adds 14400s (4hours) in my test. This prevents caching by browser and proxies so the CSS can be reliably requested.
This commit is contained in:
parent
44d941c93c
commit
16fafed6a2
1 changed files with 1 additions and 1 deletions
|
@ -594,7 +594,7 @@ def health():
|
|||
@app.route('/client<token>.css', methods=['GET', 'POST'])
|
||||
def client_token(token=None):
|
||||
link_token.ping(sxng_request, token)
|
||||
return Response('', mimetype='text/css')
|
||||
return Response('', mimetype='text/css', headers={"Cache-Control": "no-store, max-age=0"})
|
||||
|
||||
|
||||
@app.route('/rss.xsl', methods=['GET', 'POST'])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue