endpoint fallback

This commit is contained in:
fogelito 2025-12-16 09:49:35 +02:00
parent 6fbacb484b
commit 1c165b8c8d

View file

@ -153,7 +153,7 @@ class Migrations extends Action
$database = null;
$queries = [];
if ($credentials['endpoint'] === 'http://localhost/v1') {
if (($credentials['endpoint'] ?? null) === 'http://localhost/v1') {
$platform = Config::getParam('platform', []);
$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') === 'disabled' ? 'http' : 'https';
$credentials['endpoint'] = $protocol . '://' . $platform['apiHostname'] . '/v1';