1
0
Fork 0
mirror of synced 2024-09-30 17:26:48 +13:00

Merge pull request #6302 from appwrite/fix-migrations

Fix: migrations
This commit is contained in:
Christy Jacob 2023-09-21 10:35:39 -04:00 committed by GitHub
commit deb58a60b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,7 +68,9 @@ function router(App $utopia, Database $dbForConsole, SwooleRequest $swooleReques
}
if (App::getEnv('_APP_OPTIONS_ROUTER_PROTECTION', 'disabled') === 'enabled') {
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.');
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