Skip to content
Permalink
Browse files
clean route
  • Loading branch information
aheinze committed Sep 9, 2021
1 parent 1f342c5 commit f1919184998bf9fa7a7db882c98ce1410375e596
Showing with 1 addition and 1 deletion.
  1. +1 −1 index.php
@@ -23,7 +23,7 @@

# admin route
if (COCKPIT_ADMIN && !defined('COCKPIT_ADMIN_ROUTE')) {
$route = preg_replace('#'.preg_quote(COCKPIT_BASE_URL, '#').'#', '', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), 1);
$route = str_replace('../', '', preg_replace('#'.preg_quote(COCKPIT_BASE_URL, '#').'#', '', parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), 1));
define('COCKPIT_ADMIN_ROUTE', $route == '' ? '/' : $route);
}

0 comments on commit f191918

Please sign in to comment.