Merge factors type for authentication
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
use std::net::IpAddr;
|
||||
|
||||
use actix_web::{Error, FromRequest, HttpRequest, web};
|
||||
use actix_web::dev::Payload;
|
||||
use futures_util::future::{Ready, ready};
|
||||
use actix_web::{web, Error, FromRequest, HttpRequest};
|
||||
use futures_util::future::{ready, Ready};
|
||||
|
||||
use crate::data::app_config::AppConfig;
|
||||
use crate::utils::network_utils::get_remote_ip;
|
||||
@@ -25,4 +25,4 @@ impl FromRequest for RemoteIP {
|
||||
let config: &web::Data<AppConfig> = req.app_data().expect("AppData undefined!");
|
||||
ready(Ok(RemoteIP(get_remote_ip(req, config.proxy_ip.as_deref()))))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user