/** * Public alias for the application entry point * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ use Magento\Framework\App\Bootstrap; use Magento\Framework\App\MaintenanceMode; use Magento\Framework\HTTP\PhpEnvironment\RemoteAddress; try { require __DIR__ . '/../app/bootstrap.php'; } catch (\Exception $e) { echo <<

Autoload error

{$e->getMessage()}

HTML; http_response_code(500); exit(1); } $bootstrap = Bootstrap::create(BP, $_SERVER); $objectManager = $bootstrap->getObjectManager(); /** @var MaintenanceMode $maintenance */ $maintenance = $objectManager->get(MaintenanceMode::class); /** @var RemoteAddress $remoteAddress */ $remoteAddress = $objectManager->get(RemoteAddress::class); if ($maintenance->isOn($remoteAddress->getRemoteAddress() ?: '')) { require __DIR__ . '/errors/503.php'; exit(0); } /** @var \Magento\Framework\App\Http $app */ $app = $bootstrap->createApplication(\Magento\Framework\App\Http::class); $bootstrap->run($app);