Update auth.php
This commit is contained in:
parent
10c90945b8
commit
5f5abe02b9
1 changed files with 3 additions and 3 deletions
|
|
@ -4,10 +4,10 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) {
|
|||
header('HTTP/1.0 401 Unauthorized');
|
||||
echo 'Text to send if user hits Cancel button';
|
||||
exit;
|
||||
} elseif ($_SERVER['PHP_AUTH_USER']=='user' && $_SERVER['PHP_AUTH_PW']=='pass') {
|
||||
echo "OK";
|
||||
} else {
|
||||
} elseif ($_SERVER['PHP_AUTH_USER']!='user' && $_SERVER['PHP_AUTH_PW']!='pass') {
|
||||
header('HTTP/1.0 403 Forbidden');
|
||||
echo 'Forbidden';
|
||||
exit;
|
||||
}
|
||||
|
||||
include "api.php";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue