[enh] py: whitenoise for static handling (#5032)

While looking at ways to better handle static files, I saw a package that replaces Flask `static_folder` functionality. Not only it's considerably faster, but already includes the capability to serve sidecars without having to intercept. This also replaces the uWSGI folder mapping functionality.

Closes https://github.com/searxng/searxng/issues/4977
This commit is contained in:
Ivan Gabaldon
2025-07-23 18:16:10 +02:00
committed by GitHub
parent 5cbf422621
commit 42f102ce1b
6 changed files with 27 additions and 17 deletions

View File

@@ -75,7 +75,4 @@ pythonpath = ${SEARXNG_SRC}
http = ${SEARXNG_INTERNAL_HTTP}
buffer-size = 8192
# To serve the static files via the WSGI server
static-map = /static=${SEARXNG_STATIC}
static-gzip-all = True
offload-threads = %k

View File

@@ -72,7 +72,4 @@ pythonpath = ${SEARXNG_SRC}
socket = ${SEARXNG_UWSGI_SOCKET}
buffer-size = 8192
# To serve the static files via the WSGI server
static-map = /static=${SEARXNG_STATIC}
static-gzip-all = True
offload-threads = %k

View File

@@ -78,7 +78,4 @@ pythonpath = ${SEARXNG_SRC}
http = ${SEARXNG_INTERNAL_HTTP}
buffer-size = 8192
# To serve the static files via the WSGI server
static-map = /static=${SEARXNG_STATIC}
static-gzip-all = True
offload-threads = %k

View File

@@ -75,7 +75,4 @@ pythonpath = ${SEARXNG_SRC}
socket = ${SEARXNG_UWSGI_SOCKET}
buffer-size = 8192
# To serve the static files via the WSGI server
static-map = /static=${SEARXNG_STATIC}
static-gzip-all = True
offload-threads = %k