git-svn-id: https://msi/svn/firstRepo/Service/branches/Manut_2.2.3@49 0f545695-f87b-41b6-9a03-7f16563b5454

This commit is contained in:
2016-01-15 17:04:16 +00:00
parent b371156b94
commit 0f64cd747d
22 changed files with 1942 additions and 113 deletions
+4 -2
View File
@@ -12,8 +12,10 @@ require_once 'Slim/Slim.php';
$app = new \Slim\Slim();
date_default_timezone_set('Europe/Rome');
$app->hook('slim.before.router', function () use ($app, $allowedHost) {
$currentRefererRequest = $app->request()->getReferer();
/*$currentRefererRequest = $app->request()->getReferer();
$currentRefererRequest = substr($currentRefererRequest, 7); //Senza http://
$indexDoublePoint = strpos($currentRefererRequest, ':');
$indexFirstSlash = strpos($currentRefererRequest, '/');
@@ -29,7 +31,7 @@ $app->hook('slim.before.router', function () use ($app, $allowedHost) {
{
$app->halt(403, "Request arrive from host not allowed " . $currentHostRequest );
return;
}
}*/
if(isset($_SERVER['HTTP_ORIGIN']))
header('Access-Control-Allow-Origin: ' . $_SERVER['HTTP_ORIGIN']);