From 8f1e09875be594b5713908bb9d92894a663b2210 Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Sun, 13 Oct 2019 09:55:36 -0700 Subject: Initialize the flask app with a random static path, to avoid issue where /static doesn't work in website mode --- onionshare/web/web.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/onionshare/web/web.py b/onionshare/web/web.py index 4c4207e6..b5b805ec 100644 --- a/onionshare/web/web.py +++ b/onionshare/web/web.py @@ -68,6 +68,9 @@ class Web: self.app = Flask( __name__, static_folder=self.common.get_resource_path("static"), + static_url_path="/static_".format( + self.common.random_string(16) + ), # randomize static_url_path to avoid making /static unusable template_folder=self.common.get_resource_path("templates"), ) self.app.secret_key = self.common.random_string(8) -- cgit v1.2.3-54-g00ecf