check _APP_MIGRATION_HOST

This commit is contained in:
fogelito
2026-02-05 10:35:35 +02:00
parent aff180c517
commit 074470c2c2
+6 -2
View File
@@ -336,8 +336,12 @@ class Migrations extends Action
//$protocol = System::getEnv('_APP_OPTIONS_FORCE_HTTPS') === 'disabled' ? 'http' : 'https';
//$endpoint = $protocol . '://' . $platform['apiHostname'] . '/v1';
$endpoint = 'http://localhost/v1';
$endpoint = 'http://appwrite/v1';
$host = System::getEnv('_APP_MIGRATION_HOST');
if (empty($host)) {
throw new \Exception('_APP_MIGRATION_HOST is not set');
}
$endpoint = 'http://'.$host.'/v1';
try {
$credentials = $migration->getAttribute('credentials', []);