mirror of
https://forge.pointfixe.fr/hubert/gitust.git
synced 2026-02-04 16:37:30 +01:00
validator for git proto
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user