Browse Source

[fix] uwsgi: don't set static-expires

As long we don't have a working solution for cache busting [3][4] we should not
set an expire time in thw uWSGI config.

The default procedure in every web browser is the "304 Not Modified" [2] and
this default procedure should also be sufficient for us as long as we have not
implemented a complete alternative (cache busting) / form [1]

> By default uWSGI will add a Last-Modified [2] header to all static responses,
> and will honor the If-Modified-Since [2] request header.

[1] https://uwsgi-docs.readthedocs.io/en/latest/StaticFiles.html#setting-the-expires-headers
[2] https://developer.mozilla.org/de/docs/Web/HTTP/Status/304
[3] https://github.com/searxng/searxng/pull/4433
[4] https://github.com/searxng/searxng/issues/964

Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Markus Heiser 1 month ago
parent
commit
523d2a7683

+ 0 - 1
dockerfiles/uwsgi.ini

@@ -49,6 +49,5 @@ die-on-term
 # uwsgi serves the static files
 # uwsgi serves the static files
 static-map = /static=/usr/local/searxng/searx/static
 static-map = /static=/usr/local/searxng/searx/static
 # expires set to one day
 # expires set to one day
-static-expires = /* 86400
 static-gzip-all = True
 static-gzip-all = True
 offload-threads = %k
 offload-threads = %k

+ 0 - 2
utils/templates/etc/uwsgi/apps-archlinux/searxng.ini

@@ -81,7 +81,5 @@ buffer-size = 8192
 #     static_use_hash: true
 #     static_use_hash: true
 #
 #
 static-map = /static=${SEARXNG_STATIC}
 static-map = /static=${SEARXNG_STATIC}
-# expires set to one day
-static-expires = /* 86400
 static-gzip-all = True
 static-gzip-all = True
 offload-threads = %k
 offload-threads = %k

+ 0 - 2
utils/templates/etc/uwsgi/apps-archlinux/searxng.ini:socket

@@ -78,7 +78,5 @@ buffer-size = 8192
 #     static_use_hash: true
 #     static_use_hash: true
 #
 #
 static-map = /static=${SEARXNG_STATIC}
 static-map = /static=${SEARXNG_STATIC}
-# expires set to one day
-static-expires = /* 86400
 static-gzip-all = True
 static-gzip-all = True
 offload-threads = %k
 offload-threads = %k

+ 0 - 2
utils/templates/etc/uwsgi/apps-available/searxng.ini

@@ -84,7 +84,5 @@ buffer-size = 8192
 #     static_use_hash: true
 #     static_use_hash: true
 #
 #
 static-map = /static=${SEARXNG_STATIC}
 static-map = /static=${SEARXNG_STATIC}
-# expires set to one day
-static-expires = /* 86400
 static-gzip-all = True
 static-gzip-all = True
 offload-threads = %k
 offload-threads = %k

+ 0 - 2
utils/templates/etc/uwsgi/apps-available/searxng.ini:socket

@@ -81,7 +81,5 @@ buffer-size = 8192
 #     static_use_hash: true
 #     static_use_hash: true
 #
 #
 static-map = /static=${SEARXNG_STATIC}
 static-map = /static=${SEARXNG_STATIC}
-# expires set to one day
-static-expires = /* 86400
 static-gzip-all = True
 static-gzip-all = True
 offload-threads = %k
 offload-threads = %k