no longer log /liveness and /readiness (logspam)

This commit is contained in:
Brandon Thomas committed 2020-05-27 20:08:37 -04:00
1 parent fd91d303b2
commit 2dcc4e5896
3 files changed
+3 -3

No files matched your search

-1
View File
@@ -7,7 +7,6 @@ use actix_web::{
#[get("/liveness")]
pub async fn get_liveness(_request: HttpRequest) -> std::io::Result<HttpResponse> {
println!("GET /liveness");
Ok(HttpResponse::build(StatusCode::OK)
.content_type("text/html; charset=utf-8")
.body("Live"))
-1
View File
@@ -7,7 +7,6 @@ use actix_web::{
#[get("/readiness")]
pub async fn get_readiness(_request: HttpRequest) -> std::io::Result<HttpResponse> {
println!("GET /readiness");
Ok(HttpResponse::build(StatusCode::OK)
.content_type("text/html; charset=utf-8")
.body("Ready"))
+3 -1
View File
@@ -108,7 +108,9 @@ async fn main() -> std::io::Result<()> {
.allowed_header(http::header::CONTENT_TYPE)
.max_age(3600)
.finish())
.wrap(Logger::default())
.wrap(Logger::default()
.exclude("/liveness")
.exclude("/readiness"))
.service(Files::new("/frontend", asset_directory.clone()).show_files_listing())
.service(
web::resource("/advanced_tts")