-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
33 lines (23 loc) · 765 Bytes
/
Copy pathindex.php
File metadata and controls
33 lines (23 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
declare(strict_types=1);
require __DIR__.'/apps/server/vendor/autoload.php';
$requestHeaderBridge = new \App\Runtime\Xampp\RequestHeaderBridge();
$_SERVER = $requestHeaderBridge->bridge(
$_SERVER,
function_exists('getallheaders') ? (array) getallheaders() : [],
);
$assetBridge = new \App\Runtime\Xampp\PublicAssetBridge(__DIR__.'/apps/server/public');
$resolvedAsset = $assetBridge->resolve(
$_SERVER['REQUEST_URI'] ?? '/',
$_SERVER['SCRIPT_NAME'] ?? '/index.php'
);
if ($resolvedAsset !== null) {
$assetBridge->send($resolvedAsset);
}
$entrypoint = __DIR__.'/apps/server/public/index.php';
if (! is_file($entrypoint)) {
http_response_code(500);
echo 'Laravel entrypoint not found.';
exit(1);
}
require $entrypoint;