Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion app/src/web/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ pub(super) async fn init_static_routes() -> Result<Router> {
.push(
Router::with_path("{*path}")
.hoop(compression)
.get(static_embed::<ClientAssets>().fallback("index.html")),
// Only "/" maps to the app; the frontend has no client-side
// routes, so unknown paths (and /favicon.ico) get a 404
// rather than index.html served as every file.
.get(static_embed::<ClientAssets>().defaults("index.html")),
)
};
Ok(router)
Expand Down
1 change: 1 addition & 0 deletions crates/rkvm-web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
<title>rustkvm</title>
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1' y='2' width='14' height='10' rx='2' fill='%234f8cff'/%3E%3Crect x='5' y='13' width='6' height='1.5' rx='.75' fill='%234f8cff'/%3E%3C/svg%3E" />
<link data-trunk rel="rust" data-wasm-opt="z" />
<script src="https://cdn.jsdelivr.net/npm/tesseract.js@5/dist/tesseract.min.js"></script>
<script>
Expand Down
Loading