remove _url, align with https://github.com/opnsense/core/issues/2494
This commit is contained in:
parent
31cbe50131
commit
1ce741ccaa
|
@ -81,15 +81,10 @@ if (PHP_OS == 'WINNT') {
|
||||||
define("LOG_LOCAL4", LOG_USER);
|
define("LOG_LOCAL4", LOG_USER);
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse request query parameters
|
|
||||||
$_GET = parse_url($_SERVER['REQUEST_URI'], PHP_URL_QUERY);
|
|
||||||
parse_str($_GET, $_GET);
|
|
||||||
// handle requests
|
// handle requests
|
||||||
if (preg_match("/^\/ui\/.*/", $uri)) {
|
if (preg_match("/^\/ui\/.*/", $uri)) {
|
||||||
$_GET['_url'] = urldecode(substr(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), 3));
|
|
||||||
require_once "{$DEV_WORKDIR}/stubs/index.php";
|
require_once "{$DEV_WORKDIR}/stubs/index.php";
|
||||||
} elseif (preg_match("/^\/api\/.*/", $uri)) {
|
} elseif (preg_match("/^\/api\/.*/", $uri)) {
|
||||||
$_GET['_url'] = urldecode(substr(parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH), 4));
|
|
||||||
require_once "{$DEV_WORKDIR}/stubs/api.php";
|
require_once "{$DEV_WORKDIR}/stubs/api.php";
|
||||||
} else {
|
} else {
|
||||||
header('Location: /ui/');
|
header('Location: /ui/');
|
||||||
|
|
Loading…
Reference in New Issue