set base path propperly

This commit is contained in:
Uwe Steinmann 2026-01-22 15:24:19 +01:00
parent 5fd791bbf6
commit 35e1cc2fa9
2 changed files with 3 additions and 1 deletions

View File

@ -3281,7 +3281,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()));

View File

@ -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')) {