<?php
set_time_limit(30);
ini_set("memory_limit", "-1");
use App\Kernel;
use Symfony\Component\Debug\Debug;
use Symfony\Component\HttpFoundation\Request;
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["HTTP_HOST"]."".$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
$url = curPageURL();
if ($url === 'https://www.centrumkrzesel.pl/art/16/jak-wybrac-ergonomiczne-krzeslo') {
header("Location: https://www.centrumkrzesel.pl/blog/16/jak-wybrac-ergonomiczne-krzeslo");
exit();
}
//if ($_SERVER['REMOTE_ADDR']=='85.221.152.164' || $_SERVER['REMOTE_ADDR'] === '185.229.227.78') {
if (1==1) {
require dirname(__DIR__).'/config/bootstrap.php';
if ($_SERVER['APP_DEBUG']) {
umask(0000);
Debug::enable();
}
if ($trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false) {
Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_ALL ^ Request::HEADER_X_FORWARDED_HOST);
}
if ($trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false) {
Request::setTrustedHosts([$trustedHosts]);
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
} else {
echo '-';
exit();
}