24 lines
816 B
PHP
24 lines
816 B
PHP
<?php
|
|
|
|
use App\Support\IsolatedQaDatabase;
|
|
use Illuminate\Foundation\Vite;
|
|
use Illuminate\Http\Request;
|
|
use Illuminate\Support\Facades\DB;
|
|
|
|
require __DIR__.'/continuity-qa-bootstrap.php';
|
|
$qaRoot = dirname(__DIR__);
|
|
$public = $qaRoot.'/public';
|
|
$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
|
if ($path !== '/' && is_file($public.$path)) {
|
|
return false;
|
|
}
|
|
$app = require $qaRoot.'/bootstrap/app.php';
|
|
$app->booted(function () {
|
|
$identity = DB::selectOne('select current_database() as name, inet_server_port() as port');
|
|
if (! IsolatedQaDatabase::allowsSchemaChanges() || $identity->name !== 'continuity_20261120_test' || (int) $identity->port !== 55441) {
|
|
abort(503);
|
|
}
|
|
app(Vite::class)->useBuildDirectory('build-qa-opportunities');
|
|
});
|
|
$app->handleRequest(Request::capture());
|