mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Log when an invalid URL path is accessed
This commit is contained in:
@@ -22,6 +22,11 @@ async fn main() -> std::io::Result<()> {
|
|||||||
let internal_auth = actix_web::web::Data::new(crate::robocraft::IntercomAuth::new(&cli_args.data_robocraft)?);
|
let internal_auth = actix_web::web::Data::new(crate::robocraft::IntercomAuth::new(&cli_args.data_robocraft)?);
|
||||||
HttpServer::new(move || {
|
HttpServer::new(move || {
|
||||||
App::new()
|
App::new()
|
||||||
|
.wrap_fn(|req, srv| {
|
||||||
|
use actix_web::dev::Service;
|
||||||
|
log::trace!("Request {} {}", req.method(), req.path());
|
||||||
|
srv.call(req)
|
||||||
|
})
|
||||||
.app_data(cli_args2.clone())
|
.app_data(cli_args2.clone())
|
||||||
.app_data(internal_auth.clone())
|
.app_data(internal_auth.clone())
|
||||||
.service(index)
|
.service(index)
|
||||||
|
|||||||
@@ -51,6 +51,11 @@ async fn main() -> std::io::Result<()> {
|
|||||||
|
|
||||||
HttpServer::new(move || {
|
HttpServer::new(move || {
|
||||||
App::new()
|
App::new()
|
||||||
|
.wrap_fn(|req, srv| {
|
||||||
|
use actix_web::dev::Service;
|
||||||
|
log::trace!("Request {} {}", req.method(), req.path());
|
||||||
|
srv.call(req)
|
||||||
|
})
|
||||||
.app_data(cli_args2.clone())
|
.app_data(cli_args2.clone())
|
||||||
.app_data(rc_preloaded.clone())
|
.app_data(rc_preloaded.clone())
|
||||||
.app_data(internal_auth.clone())
|
.app_data(internal_auth.clone())
|
||||||
@@ -66,6 +71,8 @@ async fn main() -> std::io::Result<()> {
|
|||||||
.service(robocraft::username::user_password_auth)
|
.service(robocraft::username::user_password_auth)
|
||||||
.service(robocraft::intercom::services_ws)
|
.service(robocraft::intercom::services_ws)
|
||||||
.service(robocraft::intercom::service_msg)
|
.service(robocraft::intercom::service_msg)
|
||||||
|
.service(robocraft::intercom::lobby_state_ws)
|
||||||
|
.service(robocraft::intercom::lobby_state_msg)
|
||||||
.service(robocraft::intercom::status_get)
|
.service(robocraft::intercom::status_get)
|
||||||
.service(robocraft::intercom::status_set)
|
.service(robocraft::intercom::status_set)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user