mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-07-01 05:55:02 +03:00
корректно работает с поддоменами
This commit is contained in:
parent
f867ab5a13
commit
0e3f96d57a
|
@ -38,10 +38,12 @@ class LsSecurity extends Module {
|
|||
|
||||
public function ValidateReferal() {
|
||||
if (isset($_SERVER['HTTP_REFERER'])) {
|
||||
$aUrl=parse_url($_SERVER['HTTP_REFERER']);
|
||||
$aUrl=parse_url($_SERVER['HTTP_REFERER']);
|
||||
if ($aUrl['host']==$_SERVER['HTTP_HOST']) {
|
||||
return true;
|
||||
}
|
||||
} elseif (preg_match("/\.".quotemeta($_SERVER['HTTP_HOST'])."$/i",$aUrl['host'])) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue