mirror of
https://github.com/usestrix/strix.git
synced 2026-09-10 22:41:11 +00:00
Set session cookie whenever index.html is served
This commit is contained in:
parent
9ba8e0f219
commit
e246745e4e
1 changed files with 1 additions and 1 deletions
|
|
@ -402,11 +402,11 @@ def _make_handler(state: _ViewerState) -> type[BaseHTTPRequestHandler]:
|
|||
|
||||
def _handle_static(self, path: str) -> None:
|
||||
target = self._resolve_asset(path)
|
||||
is_index = target is None
|
||||
if target is None:
|
||||
# SPA fallback: unknown non-asset routes render index.html so
|
||||
# client-side deep links work.
|
||||
target = state.assets_dir / "index.html"
|
||||
is_index = target.name == "index.html"
|
||||
if not target.is_file():
|
||||
self._send_json(HTTPStatus.NOT_FOUND, {"error": "not found"})
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue