catch all on git protocol route
This commit is contained in:
parent
f4f4c5a0a2
commit
97ebae11f8
|
@ -115,7 +115,7 @@ async fn git_main(web::Path((owner, reponame)): web::Path<(String, String)>, web
|
||||||
let user = User { name : "Hubert".to_string()};
|
let user = User { name : "Hubert".to_string()};
|
||||||
GitMainTemplate { repo, browse : browse, root : path, user_opt : Some(user)}
|
GitMainTemplate { repo, browse : browse, root : path, user_opt : Some(user)}
|
||||||
}
|
}
|
||||||
#[get("/git/{owner}/{repo}.git/{path:.*}")]
|
//#[get("/git/{owner}/{repo}.git/{path:.*}")]
|
||||||
async fn git_proto(web::Path((owner, reponame)): web::Path<(String, String)>, req: HttpRequest) -> impl Responder{
|
async fn git_proto(web::Path((owner, reponame)): web::Path<(String, String)>, req: HttpRequest) -> impl Responder{
|
||||||
"not yet implemented"
|
"not yet implemented"
|
||||||
}
|
}
|
||||||
|
@ -176,7 +176,7 @@ async fn main() -> std::io::Result<()> {
|
||||||
.service(askama)
|
.service(askama)
|
||||||
.service(git_main)
|
.service(git_main)
|
||||||
.service(hello_session)
|
.service(hello_session)
|
||||||
.service(git_proto)
|
//.service(git_proto)
|
||||||
// .service(
|
// .service(
|
||||||
// web::scope("/auth")
|
// web::scope("/auth")
|
||||||
// .wrap(auth)
|
// .wrap(auth)
|
||||||
|
@ -187,6 +187,10 @@ async fn main() -> std::io::Result<()> {
|
||||||
.wrap(auth)
|
.wrap(auth)
|
||||||
.route(web::get().to(hello_auth))
|
.route(web::get().to(hello_auth))
|
||||||
)
|
)
|
||||||
|
.service(
|
||||||
|
web::resource("/git/{user}/{repo}.git/{path:.*}")
|
||||||
|
.route(web::route().to(git_proto))
|
||||||
|
)
|
||||||
.service(
|
.service(
|
||||||
Files::new("/static", "static")
|
Files::new("/static", "static")
|
||||||
.use_last_modified(true)
|
.use_last_modified(true)
|
||||||
|
|
Loading…
Reference in New Issue