You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
7 lines
305 B
7 lines
305 B
<?php |
|
function header_auth(string $pw, string $header = 'Auth') { |
|
if ((empty($_SERVER['HTTP_' . strtoupper($header)]) || trim($_SERVER['HTTP_' . strtoupper($header)]) !== $pw) && $_GET[strtolower($header)] !== $pw) { |
|
require('http_errors.php'); |
|
HttpResponse::forbidden()->set_and_exit(); |
|
} |
|
}
|
|
|