Remove ending slash from static_url_path

This commit is contained in:
Frankie Liu 2019-05-06 15:13:09 -04:00 committed by David Lord
parent 7f98a28432
commit 2039e2e3b6
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
4 changed files with 15 additions and 2 deletions

View file

@ -587,7 +587,7 @@ class Flask(_PackageBoundObject):
bool(static_host) == host_matching
), "Invalid static_host/host_matching combination"
self.add_url_rule(
self.static_url_path + "/<path:filename>",
self.static_url_path.rstrip("/") + "/<path:filename>",
endpoint="static",
host=static_host,
view_func=self.send_static_file,