mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
- use token header from $_SERVER; fixed errors with auth token headers occured on some software configurations
This commit is contained in:
parent
8b4960206d
commit
5b3dd0d0fc
1 changed files with 2 additions and 2 deletions
|
|
@ -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.");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue