diff options
| author | bearz314 <wongchoonjie@gmail.com> | 2025-02-11 00:47:46 +1100 |
|---|---|---|
| committer | Markus Heiser <markus.heiser@darmarIT.de> | 2025-02-20 07:55:45 +0100 |
| commit | 16fafed6a2b768999245bf61a2c6dd5156cb7dc2 (patch) | |
| tree | fd658a17842b1a74129525b580882a8622939d39 | |
| parent | 44d941c93c1141ff5a0d1c7ccbccb06ca457e678 (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.
| -rwxr-xr-x | searx/webapp.py | 2 |
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']) |