1
0
mirror of https://github.com/myvesta/vesta.git synced 2025-03-12 04:35:23 -07:00

Update index.php

This commit is contained in:
myvesta 2021-08-15 14:36:45 +02:00 committed by GitHub
parent d66afcbaaa
commit 9f55ef33cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,14 +1,5 @@
<?php
// Preventing CSRF
$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) {
die ("Nope.");
}
// Init
error_reporting(NULL);
ob_start();