mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-24 22:46:08 +02:00
Fixed possible missing leading slash in path
This commit is contained in:
@@ -55,6 +55,6 @@ class StripBasePathMiddleware
|
||||
{
|
||||
$pattern = sprintf('/^%s/', preg_quote(dirname($_SERVER['SCRIPT_NAME']), '/'));
|
||||
|
||||
return preg_replace($pattern, '', $path);
|
||||
return '/' . ltrim(preg_replace($pattern, '', $path), '/');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user