Browse Source

[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
Ivan Gabaldon 1 week ago
parent
commit
802bf4f9e7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      searx/webapp.py

+ 1 - 1
searx/webapp.py

@@ -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: