validator for git proto

This commit is contained in:
2021-07-21 13:33:12 +02:00
parent aa131d009f
commit 6d87adb2e6
3 changed files with 15 additions and 4 deletions

View File

@@ -34,6 +34,7 @@ use gitutils::gitfile::GitFile;
use gitutils::gitproto;
use gitutils::gitrepo::GitRepo;
use web::repo;
use webutils::auth;
use crate::git::GitBrowseEntry;
use crate::gitust::Gitust;
@@ -165,6 +166,7 @@ async fn main() -> std::io::Result<()> {
// .wrap(Logger::new("%a %{User-Agent}i"))
.wrap(CookieSession::signed(session_key).secure(false))
.data(gitust)
.data(auth::TestValidator)
.service(hello)
.service(echo)
.service(hello_test)
@@ -186,7 +188,7 @@ async fn main() -> std::io::Result<()> {
)
.service(
webx::resource("/git/{user}/{repo}.git/{path:.*}")
.route(webx::route().to(gitproto::git_proto))
.route(webx::route().to(gitproto::git_proto::<auth::TestValidator>))
)
.service(
Files::new("/static", "static")