mirror of
https://git.42l.fr/neil/sncf.git
synced 2024-06-16 14:35:00 +02:00
fully restrict /apps/files from src/forward
This commit is contained in:
parent
7fbfcf485c
commit
162cdad7fe
|
@ -31,7 +31,7 @@ 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 route == "/apps/files" {
|
||||
if route.starts_with("/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| {
|
||||
|
|
|
@ -76,7 +76,6 @@ const BLOCKED_ROUTES: &[&str] = &[
|
|||
"/settings",
|
||||
"/ocs/v",
|
||||
"/remote.php",
|
||||
"/apps/files",
|
||||
"/core/templates/filepicker.html",
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue