Skip to content

Commit 88d4a5c

Browse files
authored
Update core.py for double url prefix (#1002)
1 parent 65d3c68 commit 88d4a5c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

py4web/core.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,8 @@ def URL( # pylint: disable=invalid-name
899899
broken_parts.insert(1, "_" + static_version)
900900

901901
url_prefix = os.environ.get("PY4WEB_URL_PREFIX", "")
902+
if url_prefix and prefix and prefix.startswith(url_prefix):
903+
url_prefix = ""
902904
url = (
903905
url_prefix
904906
+ prefix

0 commit comments

Comments
 (0)