Skip to content

Commit

Permalink
fix: fix a 404 error when loading the dashboard (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
BelKed committed Aug 2, 2023
1 parent 7527c8d commit 8b2cc22
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dist
static
.*cache
profiling
venv

# coverage stuff
.coverage
Expand Down
11 changes: 8 additions & 3 deletions aw_server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,21 @@ 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
# only prettyprint JSON if testing (due to perf)
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)
Expand Down

0 comments on commit 8b2cc22

Please sign in to comment.