Only serve index on root path

This commit is contained in:
Lily Rose 2025-07-17 19:54:37 +10:00
parent a2cf8bbbd5
commit c14b909a8c

View file

@ -58,7 +58,7 @@ fn handle_request(
use req <- app_middleware(req, static_directory)
case req.method, wisp.path_segments(req) {
Post, ["api", "geofeed"] -> handle_save_geofeed(req, geofeed_path)
Get, _ -> serve_index(geofeed_path)
Get, [] | Get, ["index.html"] -> serve_index(geofeed_path)
_, _ -> wisp.not_found()
}
}