Try to unify API responses

This commit is contained in:
2024-07-21 16:10:02 +02:00
parent a01515aa9c
commit b76c434216
5 changed files with 59 additions and 38 deletions

View File

@ -5,8 +5,8 @@ function http_401_unauthorized(): void {
header('Status: 401');
header('WWW-Authenticate: Basic realm="Elwig"');
header('Content-Type: text/plain; charset=UTF-8');
header('Content-Length: 20');
exit("401 Unauthorized :(\n");
header('Content-Length: 17');
exit("401 Unauthorized\n");
}
function authenticate(): void {