Fix migrations
This commit is contained in:
parent
864092d81c
commit
cebfc5a22d
1 changed files with 3 additions and 1 deletions
|
@ -68,8 +68,10 @@ function router(App $utopia, Database $dbForConsole, SwooleRequest $swooleReques
|
|||
}
|
||||
|
||||
if (App::getEnv('_APP_OPTIONS_ROUTER_PROTECTION', 'disabled') === 'enabled') {
|
||||
if ($host !== 'localhost' && $host !== APP_HOSTNAME_INTERNAL) { // localhost allowed for proxy, APP_HOSTNAME_INTERNAL allowed for migrations
|
||||
throw new AppwriteException(AppwriteException::GENERAL_ACCESS_FORBIDDEN, 'Router protection does not allow accessing Appwrite over this domain. Please add it as custom domain to your project or disable _APP_OPTIONS_ROUTER_PROTECTION environment variable.');
|
||||
}
|
||||
}
|
||||
|
||||
// Act as API - no Proxy logic
|
||||
$utopia->getRoute()?->label('error', '');
|
||||
|
|
Loading…
Reference in a new issue