diff --git a/CHANGELOG b/CHANGELOG index 4ba9c3793..8729a7708 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -373,6 +373,7 @@ - simple password strength algorithmn takes length of password into account, if length is greater than 8 - parse changelog and readme of extension as markdown +- fix incorrect base path for url routing, which broke some extensions -------------------------------------------------------------------------------- Changes in version 5.1.44 diff --git a/restapi/index.php b/restapi/index.php index 8a395aa13..9f4af9321 100644 --- a/restapi/index.php +++ b/restapi/index.php @@ -3377,7 +3377,7 @@ $container->set('notifier', $notifier); $container->set('authenticator', $authenticator); $container->set('translator', $translator); -$app->setBasePath($settings->_httpRoot."restapi/index.php"); +$app->setBasePath(rtrim($settings->_httpRoot, '/')."/restapi/index.php"); $app->add(new RestapiAuthMiddleware($container, $app->getResponseFactory())); diff --git a/www/index.php b/www/index.php index dd061117d..06f609252 100644 --- a/www/index.php +++ b/www/index.php @@ -61,6 +61,8 @@ if (true) { $container->set('authenticator', $authenticator); $container->set('translator', $translator); + $app->setBasePath(rtrim($settings->_httpRoot, '/')); + if (isset($GLOBALS['SEEDDMS_HOOKS']['initDMS'])) { foreach ($GLOBALS['SEEDDMS_HOOKS']['initDMS'] as $hookObj) { if (method_exists($hookObj, 'addMiddleware')) {