From 3f7de5872e50f4ffd6e8c510ed8738bd24e0b870 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sun, 30 Jun 2024 12:40:03 -0500 Subject: [PATCH] fix: add custom url prefix if needed, for fanstatic --- tailbone/util.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tailbone/util.py b/tailbone/util.py index 9a993176..78c41313 100644 --- a/tailbone/util.py +++ b/tailbone/util.py @@ -201,6 +201,9 @@ def get_liburl(request, key, fallback=True): static = importlib.import_module(static) needed = request.environ['fanstatic.needed'] liburl = needed.library_url(static.libcache) + '/' + # nb. add custom url prefix if needed, e.g. /theo + if request.script_name: + liburl = request.script_name + liburl if key == 'buefy': return 'https://unpkg.com/buefy@{}/dist/buefy.min.js'.format(version)