Merge pull request #9460 from chrometoasters/pulls/fix-9459-public-path

Fix SS_BASE_URL logic when undefined and docroot without public folder
This commit is contained in:
Garion Herman 2020-04-20 21:06:46 +12:00 committed by GitHub
commit 9aba767e36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -148,9 +148,9 @@ if (!defined('BASE_URL')) {
}
$requestURI = $_SERVER['REQUEST_URI'];
// Check if /base/public or /base are in the request
// Check if /base/public or /base are in the request (delimited by /)
foreach ([$baseURL, dirname($baseURL)] as $candidate) {
if (stripos($requestURI, $candidate) === 0) {
if (stripos($requestURI, rtrim($candidate, '/') . '/') === 0) {
return $candidate;
}
}