diff --git a/frontend.py b/frontend.py index f1f6710..604e4ac 100644 --- a/frontend.py +++ b/frontend.py @@ -35,7 +35,10 @@ from redis_session import RedisSessionStore from voc_mqtt import send_message -app = Flask(__name__) +app = Flask( + __name__, + static_folder=CONFIG.get('static_path', 'static'), +) app.wsgi_app = ProxyFix(app.wsgi_app) for copy_key in ( @@ -61,7 +64,7 @@ def cached_asset_name(asset): asset_id, "jpg" if asset["filetype"] == "image" else "mp4", ) - cache_name = f"static/{filename}" + cache_name = os.path.join(CONFIG.get('static_path', 'static'), filename) if not os.path.exists(cache_name): app.logger.info(f"fetching {asset_id} to {cache_name}")