mirror of
https://github.com/nextcloud/server.git
synced 2026-02-18 18:28:50 -05:00
fix(navigation): Fix absolute URLs from default apps
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
553870d30a
commit
cdfce26ea9
1 changed files with 5 additions and 0 deletions
|
|
@ -304,6 +304,11 @@ class URLGenerator implements IURLGenerator {
|
|||
if ($href === '') {
|
||||
throw new \InvalidArgumentException('Default navigation entry is missing href: ' . $entryId);
|
||||
}
|
||||
|
||||
if (str_starts_with($href, $this->getBaseUrl())) {
|
||||
return $href;
|
||||
}
|
||||
|
||||
if (str_starts_with($href, '/index.php/') && ($this->config->getSystemValueBool('htaccess.IgnoreFrontController', false) || getenv('front_controller_active') === 'true')) {
|
||||
$href = substr($href, 10);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue