feat: disable request logging, don't log ip
This commit is contained in:
parent
40fba9992a
commit
48fa99002a
|
@ -16,7 +16,7 @@ use actix_web::{
|
||||||
HeaderName, CONTENT_SECURITY_POLICY, PERMISSIONS_POLICY, REFERRER_POLICY,
|
HeaderName, CONTENT_SECURITY_POLICY, PERMISSIONS_POLICY, REFERRER_POLICY,
|
||||||
X_CONTENT_TYPE_OPTIONS, X_FRAME_OPTIONS, X_XSS_PROTECTION,
|
X_CONTENT_TYPE_OPTIONS, X_FRAME_OPTIONS, X_XSS_PROTECTION,
|
||||||
},
|
},
|
||||||
middleware::{self, Condition, DefaultHeaders, Logger},
|
middleware::{self, Condition, DefaultHeaders},
|
||||||
web::{self, Data},
|
web::{self, Data},
|
||||||
App, Error, HttpResponse, HttpServer,
|
App, Error, HttpResponse, HttpServer,
|
||||||
};
|
};
|
||||||
|
@ -81,7 +81,6 @@ async fn main() -> std::io::Result<()> {
|
||||||
let http_server = HttpServer::new({
|
let http_server = HttpServer::new({
|
||||||
move || {
|
move || {
|
||||||
App::new()
|
App::new()
|
||||||
.wrap(Logger::new(r#"%{r}a "%r" =%s %bbytes %Tsec"#))
|
|
||||||
.wrap(
|
.wrap(
|
||||||
DefaultHeaders::new()
|
DefaultHeaders::new()
|
||||||
.add(DEFAULT_CONTENT_SECURITY_POLICY)
|
.add(DEFAULT_CONTENT_SECURITY_POLICY)
|
||||||
|
|
|
@ -49,8 +49,7 @@ pub async fn upload(
|
||||||
insert_file_metadata(&file_id, file_name, &file_path, &upload_config, db).await?;
|
insert_file_metadata(&file_id, file_name, &file_path, &upload_config, db).await?;
|
||||||
|
|
||||||
log::info!(
|
log::info!(
|
||||||
"{} create new file {} (valid_till: {}, content_type: {}, delete_on_download: {})",
|
"create new file {} (valid_till: {}, content_type: {}, delete_on_download: {})",
|
||||||
req.connection_info().realip_remote_addr().unwrap_or("-"),
|
|
||||||
file_id,
|
file_id,
|
||||||
upload_config.valid_till,
|
upload_config.valid_till,
|
||||||
upload_config.content_type,
|
upload_config.content_type,
|
||||||
|
|
Loading…
Reference in New Issue