summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
authorbearz314 <wongchoonjie@gmail.com>2025-02-11 00:47:46 +1100
committerMarkus Heiser <markus.heiser@darmarIT.de>2025-02-20 07:55:45 +0100
commit16fafed6a2b768999245bf61a2c6dd5156cb7dc2 (patch)
treefd658a17842b1a74129525b580882a8622939d39 /searx/webapp.py
parent44d941c93c1141ff5a0d1c7ccbccb06ca457e678 (diff)
[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.
Diffstat (limited to 'searx/webapp.py')
-rwxr-xr-xsearx/webapp.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index 9d51b5e8c..7104853e8 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -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'])