fix the api not working
This commit is contained in:
parent
21fe5a61a4
commit
80c8a3e8a8
|
@ -29,9 +29,7 @@ impl RootSpanBuilder for DomainRootSpanBuilder {
|
||||||
let info = request.connection_info();
|
let info = request.connection_info();
|
||||||
let ip = info.realip_remote_addr().expect("hi");
|
let ip = info.realip_remote_addr().expect("hi");
|
||||||
let location = request.path();
|
let location = request.path();
|
||||||
if location.ends_with("/") {
|
info!(?method, ip, location);
|
||||||
info!(?method, ip, location);
|
|
||||||
}
|
|
||||||
tracing_actix_web::root_span!(request)
|
tracing_actix_web::root_span!(request)
|
||||||
|
|
||||||
// let client_id: &str = todo!("Somehow extract it from the authorization header");
|
// let client_id: &str = todo!("Somehow extract it from the authorization header");
|
||||||
|
@ -82,7 +80,6 @@ async fn main() -> std::io::Result<()> {
|
||||||
App::new()
|
App::new()
|
||||||
.wrap(TracingLogger::<DomainRootSpanBuilder>::new())
|
.wrap(TracingLogger::<DomainRootSpanBuilder>::new())
|
||||||
.app_data(TempFileConfig::default().directory("./tmp"))
|
.app_data(TempFileConfig::default().directory("./tmp"))
|
||||||
.service(Files::new("/", "./public").index_file("index.html"))
|
|
||||||
.service(mt_form)
|
.service(mt_form)
|
||||||
.service(health_form)
|
.service(health_form)
|
||||||
.service(parent_form)
|
.service(parent_form)
|
||||||
|
@ -90,8 +87,9 @@ async fn main() -> std::io::Result<()> {
|
||||||
.service(church_form)
|
.service(church_form)
|
||||||
.service(local_form)
|
.service(local_form)
|
||||||
.service(camp_form)
|
.service(camp_form)
|
||||||
|
.service(Files::new("/", "./public").index_file("index.html"))
|
||||||
})
|
})
|
||||||
.bind(("127.0.0.1", 4242))?
|
.bind(("localhost", 4242))?
|
||||||
.workers(2)
|
.workers(2)
|
||||||
.run()
|
.run()
|
||||||
.await
|
.await
|
||||||
|
|
Loading…
Reference in a new issue