[fix] py: absolute static path (#5043)

The path to static should be relative (If sxng is served under "/sxng", the static route passed to the client won't be "/sxng/static/..." as expected but "/static/...")

Closes https://github.com/searxng/searxng/issues/5042
This commit is contained in:
Ivan Gabaldon 2025-07-24 14:55:04 +02:00 committed by GitHub
parent 6b16a04e7e
commit 802bf4f9e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -265,7 +265,7 @@ def custom_url_for(endpoint: str, **values):
if theme_filename in _STATIC_FILES:
values["filename"] = theme_filename
return f"/static/{values['filename']}"
return f"static/{values['filename']}"
if endpoint == "info" and "locale" not in values: