Skip to content

Commit

Permalink
try to make api usable on any path
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitexus committed Jan 17, 2025
1 parent 939cbfd commit c3a8975
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,3 @@ override_dh_install:
rm debian/multiflexi/usr/lib/multiflexi/zabbixlldactions.php
sed -i "/require_once __DIR__/crequire_once '/var/lib/composer/multiflexi/autoload.php'; " debian/multiflexi-api/usr/share/multiflexi/api/index.php
sed -i "/loadConfig/c\\\\\Ease\\\\Shared::singleton()->loadConfig('/etc/multiflexi/multiflexi.env', true);" debian/multiflexi-api/usr/share/multiflexi/api/index.php
sed -i "s/\/MultiFlexi\/src/\/multiflexi/" debian/multiflexi-api/usr/share/multiflexi/api/index.php
3 changes: 2 additions & 1 deletion src/api/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
// Instantiate the app
$app = Bridge::create($container);

$basePath = '/MultiFlexi/src/api';
$uriParts = explode('/api/', \Ease\WebPage::getUri());
$basePath = $uriParts[0].'/api';

$app->setBasePath($basePath);
$path = $basePath.'/VitexSoftware/MultiFlexi/1.0.0/';
Expand Down

0 comments on commit c3a8975

Please sign in to comment.