From 8b2cc226719ccd3c334f8f7401ac821967256590 Mon Sep 17 00:00:00 2001 From: BelKed <66956532+BelKed@users.noreply.github.com> Date: Wed, 2 Aug 2023 10:14:22 +0200 Subject: [PATCH] fix: fix a `404` error when loading the dashboard (#144) --- .gitignore | 1 + aw_server/server.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index f4c24d16..ea00233a 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ dist static .*cache profiling +venv # coverage stuff .coverage diff --git a/aw_server/server.py b/aw_server/server.py index 50863b6a..ae1e2f65 100644 --- a/aw_server/server.py +++ b/aw_server/server.py @@ -35,8 +35,8 @@ def __init__( storage_method=None, cors_origins=[], custom_static=dict(), - *args, - **kwargs + static_folder=static_folder, + static_url_path="", ): name = "aw-server" self.json_provider_class = CustomJSONProvider @@ -44,7 +44,12 @@ def __init__( self.json_provider_class.compact = not testing # Initialize Flask - Flask.__init__(self, name, *args, **kwargs) + Flask.__init__( + self, + name, + static_folder=static_folder, + static_url_path=static_url_path, + ) self.config["HOST"] = host # needed for host-header check with self.app_context(): _config_cors(cors_origins, testing)