also send WWW-Authenticate header so UA can ask user

This commit is contained in:
Ralf Becker 2021-04-14 13:56:48 +02:00
parent 8c4c821514
commit e3b54e23e8

View File

@ -50,6 +50,7 @@ function fail_exit($msg)
echo "<html>\n<head>\n<title>$msg</title>\n<meta http-equiv=\"content-type\" content=\"text/html; charset=". echo "<html>\n<head>\n<title>$msg</title>\n<meta http-equiv=\"content-type\" content=\"text/html; charset=".
Api\Translation::charset()."\" />\n</head>\n<body><h1>$msg</h1>\n</body>\n</html>\n"; Api\Translation::charset()."\" />\n</head>\n<body><h1>$msg</h1>\n</body>\n</html>\n";
header('WWW-Authenticate: Basic realm="'.($GLOBALS['egw_info']['flags']['auth_realm'] ?: 'EGroupware').'"');
http_response_code(401); http_response_code(401);
exit; exit;
} }