...
This commit is contained in:
parent
cc3cb6e99c
commit
35f44e4e36
1
auth.php
1
auth.php
|
@ -15,6 +15,7 @@ $realm = 'GPS Tracker';
|
||||||
if (empty($_SERVER['PHP_AUTH_DIGEST'])) {
|
if (empty($_SERVER['PHP_AUTH_DIGEST'])) {
|
||||||
header('HTTP/1.1 401 Unauthorized');
|
header('HTTP/1.1 401 Unauthorized');
|
||||||
header('WWW-Authenticate: Digest realm="'.$realm.
|
header('WWW-Authenticate: Digest realm="'.$realm.
|
||||||
|
'",qop="auth",nonce="'.uniqid().'",opaque="'.md5($realm).'"');
|
||||||
|
|
||||||
die('Authentication failed.');
|
die('Authentication failed.');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue