移除无用日志
This commit is contained in:
parent
7bc5874863
commit
af16ce5a58
@ -3,7 +3,6 @@ use std::sync::Arc;
|
|||||||
use domain::entities::account::Account;
|
use domain::entities::account::Account;
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
|
|
||||||
pub struct Context {
|
pub struct Context {
|
||||||
pub account: Arc<Account>,
|
pub account: Arc<Account>,
|
||||||
pub token: Arc<String>,
|
pub token: Arc<String>,
|
||||||
|
@ -12,7 +12,6 @@ pub async fn authenticate_ctx(mut req: Request, next: Next) -> Response {
|
|||||||
// 获取请求的url和method,然后判断是否在白名单中,如果在白名单中,则直接返回next(req),否则继续执行下面的代码
|
// 获取请求的url和method,然后判断是否在白名单中,如果在白名单中,则直接返回next(req),否则继续执行下面的代码
|
||||||
let method = req.method().clone().to_string();
|
let method = req.method().clone().to_string();
|
||||||
let uri = req.uri().path_and_query().unwrap().to_string();
|
let uri = req.uri().path_and_query().unwrap().to_string();
|
||||||
tracing::info!("method: {}, uri: {}", method, uri);
|
|
||||||
if WHITE_LIST.into_iter().find(|item| {
|
if WHITE_LIST.into_iter().find(|item| {
|
||||||
return item.0 == method && item.1 == uri;
|
return item.0 == method && item.1 == uri;
|
||||||
}).is_some() {
|
}).is_some() {
|
||||||
@ -21,7 +20,6 @@ pub async fn authenticate_ctx(mut req: Request, next: Next) -> Response {
|
|||||||
let language = match language_header {
|
let language = match language_header {
|
||||||
Some(value) => {
|
Some(value) => {
|
||||||
let value_str: Vec<&str> = value.to_str().unwrap_or("zh-CN").split(',').collect();
|
let value_str: Vec<&str> = value.to_str().unwrap_or("zh-CN").split(',').collect();
|
||||||
tracing::info!("language: {:?}", value_str);
|
|
||||||
if value_str.is_empty() {
|
if value_str.is_empty() {
|
||||||
String::from("zh-CN")
|
String::from("zh-CN")
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user