Skip to content

Commit 5f54722

Browse files
committed
fix(perseus-axum): fixed snippet hosting
1 parent ade5137 commit 5f54722

File tree

1 file changed

+3
-2
lines changed
  • packages/perseus-axum/src

1 file changed

+3
-2
lines changed

packages/perseus-axum/src/lib.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ pub async fn get_router<M: MutableStore + 'static, T: TranslationsManager + 'sta
7171
"/.perseus/bundle.wasm.js",
7272
get_service(ServeFile::new(opts.wasm_js_bundle.clone())).handle_error(handle_fs_error),
7373
)
74-
.route(
75-
"/.perseus/snippets/*path",
74+
.nest_service(
75+
"/.perseus/snippets",
7676
get_service(ServeDir::new(opts.snippets)).handle_error(handle_fs_error),
7777
);
7878
// --- Translation and subsequent load handlers ---
@@ -146,6 +146,7 @@ pub async fn get_router<M: MutableStore + 'static, T: TranslationsManager + 'sta
146146

147147
// TODO Review if there's anything more to do here
148148
async fn handle_fs_error(_err: std::io::Error) -> impl IntoResponse {
149+
dbg!("Error!");
149150
(StatusCode::INTERNAL_SERVER_ERROR, "Couldn't serve file.")
150151
}
151152

0 commit comments

Comments
 (0)