From 16fafed6a2b768999245bf61a2c6dd5156cb7dc2 Mon Sep 17 00:00:00 2001 From: bearz314 Date: Tue, 11 Feb 2025 00:47:46 +1100 Subject: [PATCH] [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. --- searx/webapp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.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'])