Refactor dependencies to reduce code base size (#111)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Use crates to reduce code base size : * `actix-remote-ip` to safely determine user IP location * `light-openid` for the OpenID primitives & as client to handle federation Reviewed-on: #111
This commit is contained in:
@ -4,6 +4,7 @@ use std::sync::Arc;
|
||||
use actix::Actor;
|
||||
use actix_identity::config::LogoutBehaviour;
|
||||
use actix_identity::IdentityMiddleware;
|
||||
use actix_remote_ip::RemoteIPConfig;
|
||||
use actix_session::storage::CookieSessionStore;
|
||||
use actix_session::SessionMiddleware;
|
||||
use actix_web::cookie::{Key, SameSite};
|
||||
@ -113,6 +114,9 @@ async fn main() -> std::io::Result<()> {
|
||||
.app_data(web::Data::new(providers.clone()))
|
||||
.app_data(web::Data::new(jwt_signer.clone()))
|
||||
.app_data(web::Data::new(webauthn_manager.clone()))
|
||||
.app_data(web::Data::new(RemoteIPConfig {
|
||||
proxy: AppConfig::get().proxy_ip.clone(),
|
||||
}))
|
||||
.wrap(
|
||||
middleware::DefaultHeaders::new().add(("Permissions-Policy", "interest-cohort=()")),
|
||||
)
|
||||
|
Reference in New Issue
Block a user