فهرست منبع

Respond to any path with index.html

This is for the html5 location API to work correctly
Thomas Dy 10 سال پیش
والد
کامیت
8a87ccfdce
1فایلهای تغییر یافته به همراه3 افزوده شده و 0 حذف شده
  1. 3 0
      rust-server/src/handler.rs

+ 3 - 0
rust-server/src/handler.rs

@@ -111,6 +111,9 @@ impl Handler for SiteHandler {
                         res.send(b"Unauthorized").unwrap();
                     }
                 },
+                (&Get, _) => {
+                    res.send(INDEX_HTML.as_bytes()).unwrap();
+                },
                 _ => {
                     *res.status_mut() = NotFound;
                     res.send(b"Not Found").unwrap();