- use token header from $_SERVER; fixed errors with auth token headers occured on some software configurations

This commit is contained in:
Max Pozdeev 2021-09-22 14:07:56 +03:00
parent 8b4960206d
commit 5b3dd0d0fc

View file

@ -105,8 +105,8 @@ function check_token()
{
$token = access_token();
if ($token == '') return true;
$headers = getallheaders();
if (!isset($headers['MTT-Token']) || $headers['MTT-Token'] != $token) {
if (!isset($_SERVER)) return true;
if (!isset($_SERVER['HTTP_MTT_TOKEN']) || $_SERVER['HTTP_MTT_TOKEN'] != $token) {
die("Access denied! Try to reload the page.");
}
}