cmtracker/public/index.php

20 lines
506 B
PHP
Raw Normal View History

2024-11-01 20:13:12 -04:00
<?php
use App\Kernel;
2025-01-11 22:30:54 -05:00
if (preg_match("/theme\//", $_SERVER['REQUEST_URI'])) {
print file_get_contents(dirname(__FILE__).$_SERVER['REQUEST_URI']);
exit;
}
if (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https') {
$_SERVER['HTTPS'] = 'on';
$_SERVER['SERVER_PORT'] = 443;
}
2024-11-01 20:13:12 -04:00
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};