mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-01-19 08:42:48 +08:00
Fixed base URL starting slash usage
This commit is contained in:
parent
4dce03c0d3
commit
25654b2322
|
@ -26,6 +26,7 @@ class Request extends LaravelRequest
|
|||
/**
|
||||
* Override the default request methods to get the base URL
|
||||
* to directly use the custom APP_URL, if set.
|
||||
* The base URL never ends with a / but should start with one if not empty.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
@ -34,7 +35,7 @@ class Request extends LaravelRequest
|
|||
$appUrl = config('app.url', null);
|
||||
|
||||
if ($appUrl) {
|
||||
return rtrim(implode('/', array_slice(explode('/', $appUrl), 3)), '/');
|
||||
return '/' . rtrim(implode('/', array_slice(explode('/', $appUrl), 3)), '/');
|
||||
}
|
||||
|
||||
return parent::getBaseUrl();
|
||||
|
|
Loading…
Reference in New Issue
Block a user