diff --git a/src/forward.rs b/src/forward.rs index 1572b45..9ccbe83 100644 --- a/src/forward.rs +++ b/src/forward.rs @@ -31,7 +31,14 @@ pub async fn forward( // if check_route returns true, // the user supposedly tried to access a restricted page. // They get redirected to the main page. - if check_route(route) { + if route == "/apps/files" { + // exception for /apps/files: always redirect to /apps/forms + debug(&format!("Files route blocked: {}", route)); + return Ok(web_redir("/apps/forms").await.map_err(|e| { + eprintln!("error_redirect: {}", e); + crash(get_lang(&req), "error_redirect") + })?); + } else if check_route(route) { debug(&format!("Restricted route blocked: {}", route)); return Ok(web_redir("/").await.map_err(|e| { eprintln!("error_redirect: {}", e);