flashii/eeprom
Archived
3
0
Fork 1
This repository has been archived on 2025-03-27. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
eeprom/public/index.php

24 lines
546 B
PHP

<?php
namespace EEPROM;
require_once __DIR__ . '/../eeprom.php';
set_exception_handler(function(\Throwable $ex) {
\Sentry\captureException($ex);
ob_clean();
http_response_code(500);
if(PRM_DEBUG) {
header('Content-Type: text/plain; charset=utf-8');
echo (string)$ex;
} else echo '500';
exit;
});
ob_start();
$request = \Index\Http\HttpRequest::fromRequest();
$isApiDomain = $request->getHeaderLine('Host') === $cfg->getString('domain:api');
$eeprom->createRouting($isApiDomain)->dispatch($request);