mygit

[UNMAINTAINED] A cgit/webgit alternative, written in Rust
Log | Files | Refs | README | LICENSE

commit 804f022e7a23ffe3aa0d03b0853d9a71d4ba5182
parent 51bcdf6b39a828af5e34dbc9fae60b872e8e54df
Author: Johann150 <johann@qwertqwefsday.eu>
Date:   Fri,  2 Apr 2021 12:04:05 +0200

prioritize reserved paths

Diffstat:
Msrc/main.rs | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/main.rs b/src/main.rs @@ -674,6 +674,12 @@ async fn main() -> Result<(), std::io::Error> { app.with(errorpage::ErrorToErrorpage); app.at("/").get(index); + app.at("/style.css").get(static_resource); + app.at("/robots.txt").get(static_resource); + + // Raw files, patch files + app.at("/mail").get(mail::list_threads); + app.at("/:repo_name").get(repo_home); app.at("/:repo_name/").get(repo_home); @@ -693,8 +699,6 @@ async fn main() -> Result<(), std::io::Error> { .get(repo_file); app.at("*").all(static_resource); - // Raw files, patch files - app.at("/mail").get(mail::list_threads); app.listen(format!("[::]:{}", CONFIG.port)).await?; Ok(()) }