Skip to content

Commit bf4e878

Browse files
committed
better basePath support
1 parent 9dde583 commit bf4e878

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

api.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4813,9 +4813,6 @@ private function detectBasePath(string $basePath): string
48134813
$fullPath = explode('?', $_SERVER['REQUEST_URI'])[0];
48144814
if (isset($_SERVER['PATH_INFO'])) {
48154815
$path = $_SERVER['PATH_INFO'];
4816-
if (!$path) {
4817-
return $_SERVER['PHP_SELF'];
4818-
}
48194816
if (substr($fullPath, -1 * strlen($path)) == $path) {
48204817
return substr($fullPath, 0, -1 * strlen($path));
48214818
}

src/Tqdev/PhpCrudApi/Middleware/Router/SimpleRouter.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ private function detectBasePath(string $basePath): string
4545
$fullPath = explode('?', $_SERVER['REQUEST_URI'])[0];
4646
if (isset($_SERVER['PATH_INFO'])) {
4747
$path = $_SERVER['PATH_INFO'];
48-
if (!$path) {
49-
return $_SERVER['PHP_SELF'];
50-
}
5148
if (substr($fullPath, -1 * strlen($path)) == $path) {
5249
return substr($fullPath, 0, -1 * strlen($path));
5350
}

0 commit comments

Comments
 (0)