Refactor code
This commit is contained in:
@ -137,6 +137,9 @@ impl<S, B> Service<ServiceRequest> for AuthInnerMiddleware<S>
|
||||
&& (req.path().starts_with(ADMIN_ROUTES)
|
||||
|| req.path().starts_with(AUTHENTICATED_ROUTES) || req.path().eq(AUTHORIZE_URI))
|
||||
{
|
||||
log::debug!("Redirect unauthenticated user from {} to authorization route.",
|
||||
req.path());
|
||||
|
||||
let path = req.uri().to_string();
|
||||
return Ok(req
|
||||
.into_response(redirect_user_for_login(path))
|
||||
|
Reference in New Issue
Block a user