This commit is contained in:
armansansd
2023-02-14 15:56:00 +00:00
parent 05ad83ae39
commit 44d7dd4d7a
11 changed files with 1795 additions and 1414 deletions

View File

@@ -24,6 +24,12 @@
* @see http://php.net/manual/en/features.commandline.webserver.php
*/
if (PHP_SAPI !== 'cli-server') {
// Bail out if this is not PHP's Development Server.
header($_SERVER['SERVER_PROTOCOL'] . ' 403 Forbidden');
exit;
}
$url = parse_url($_SERVER['REQUEST_URI']);
if (file_exists(__DIR__ . $url['path'])) {
// Serve the requested resource as-is.