Skip to content

Commit

Permalink
Don't redundantly set session manager.
Browse files Browse the repository at this point in the history
Signed-off-by: Elizabeth Myers <[email protected]>
  • Loading branch information
Elizafox committed Apr 2, 2024
1 parent d05abfa commit 48ce496
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/web/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,12 @@ impl App {
.with_private(Key::from(&self.state.env.csrf_key));

let backend = Backend::new(self.state.db.clone());
let auth_layer = AuthManagerLayerBuilder::new(backend, session_layer.clone()).build();
let auth_layer = AuthManagerLayerBuilder::new(backend, session_layer).build();

let services = ServiceBuilder::new()
.layer(TimeoutLayer::new(Duration::seconds(15).unsigned_abs()))
.layer(NormalizePathLayer::trim_trailing_slash())
.layer(auth_layer)
.layer(session_layer)
.layer(MessagesManagerLayer)
.layer(self.state.env.ip_source.clone().into_extension());

Expand Down

0 comments on commit 48ce496

Please sign in to comment.