mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 10:37:42 -07:00
Getting hostname from $_SERVER['HTTP_HOST'] for UploadHandler
This commit is contained in:
parent
88596a8cd9
commit
914b53ea1c
1 changed files with 2 additions and 1 deletions
|
@ -2,7 +2,8 @@
|
|||
|
||||
//session_start();
|
||||
|
||||
$hostname = exec('hostname');
|
||||
$host_arr=explode(":", $_SERVER['HTTP_HOST']);
|
||||
$hostname=$host_arr[0];
|
||||
$port = $_SERVER['SERVER_PORT'];
|
||||
$expected_http_origin="https://".$hostname.":".$port;
|
||||
if ($_SERVER['HTTP_ORIGIN'] != $expected_http_origin) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue