Keep 200 status for SPA fallback
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@ -63,7 +63,7 @@ impl AppState {
|
||||
|
||||
pub fn build_app(state: AppState) -> Router {
|
||||
let index = format!("{}/index.html", state.cfg.frontend_dir);
|
||||
let spa = ServeDir::new(&state.cfg.frontend_dir).not_found_service(ServeFile::new(index));
|
||||
let spa = ServeDir::new(&state.cfg.frontend_dir).fallback(ServeFile::new(index));
|
||||
Router::new()
|
||||
.route("/healthz", get(healthz))
|
||||
.route("/api/openapi.json", get(openapi::spec))
|
||||
|
||||
Reference in New Issue
Block a user