From 860e83c58759a8df991e700dccf408302891f9db Mon Sep 17 00:00:00 2001 From: Eric Walker Date: Mon, 9 Jan 2023 22:05:14 -0500 Subject: [PATCH] Force trailing slash in static_path --- piku.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/piku.py b/piku.py index c35c339..d49e4a1 100755 --- a/piku.py +++ b/piku.py @@ -891,7 +891,7 @@ def spawn_app(app, deltas={}): for item in items: static_url, static_path = item.split(':') if static_path[0] != '/': - static_path = join(app_path, static_path) + static_path = join(app_path, static_path).rstrip("/") + "/" echo("-----> nginx will map {} to {}.".format(static_url, static_path)) env['PIKU_INTERNAL_NGINX_STATIC_MAPPINGS'] = env['PIKU_INTERNAL_NGINX_STATIC_MAPPINGS'] + expandvars( PIKU_INTERNAL_NGINX_STATIC_MAPPING, locals())