You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
384 B

<?php
namespace app\traits;
use Exception;
trait MeetRequest
{
public function serverRequest()
{
if (
!isset($_SERVER['HTTP_ORIGIN']) &&
(strpos($_SERVER['HTTP_ORIGIN'], 'localhost') === false || strpos($_SERVER['HTTP_ORIGIN'], '127.0.0.1') === false)
) {
throw new Exception('Request nao permitida!');
}
}
}