Browse Source

Update auth.php

Maurits van der Schee 8 years ago
parent
commit
5f5abe02b9
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      examples/auth.php

+ 3
- 3
examples/auth.php View File

@@ -4,10 +4,10 @@ if (!isset($_SERVER['PHP_AUTH_USER'])) {
4 4
     header('HTTP/1.0 401 Unauthorized');
5 5
     echo 'Text to send if user hits Cancel button';
6 6
     exit;
7
-} elseif ($_SERVER['PHP_AUTH_USER']=='user' && $_SERVER['PHP_AUTH_PW']=='pass') {
8
-    echo "OK";
9
-} else {
7
+} elseif ($_SERVER['PHP_AUTH_USER']!='user' && $_SERVER['PHP_AUTH_PW']!='pass') {
10 8
     header('HTTP/1.0 403 Forbidden');
9
+    echo 'Forbidden';
10
+    exit;
11 11
 }
12 12
 
13 13
 include "api.php";

Loading…
Cancel
Save