Redirect anonymous user from authenticated pages

This commit is contained in:
2022-04-02 17:44:10 +02:00
parent 9e72e6a044
commit 91fd763fe1
3 changed files with 51 additions and 15 deletions

View File

@@ -18,4 +18,13 @@ pub const MAX_SESSION_DURATION: i64 = 3600 * 6;
pub const MIN_PASS_LEN: usize = 4;
/// The name of the cookie used to store session information
pub const SESSION_COOKIE_NAME: &str = "auth-cookie";
pub const SESSION_COOKIE_NAME: &str = "auth-cookie";
/// Authenticated routes prefix
pub const AUTHENTICATED_ROUTES: &str = "/settings";
/// Admin routes prefix
pub const ADMIN_ROUTES: &str = "/admin";
/// Auth route
pub const LOGIN_ROUTE: &str = "/login";