Return the Request ID if auth fails

Still only return it if in test_mode.
This commit is contained in:
Andrew Ruthven 2024-04-21 01:12:04 +12:00
parent a02fffa4ca
commit 8f7da93a0d

View File

@ -106,6 +106,8 @@ class HTTPAuthSession {
header('HTTP/1.1 401 Unauthorized', true, 401 ); header('HTTP/1.1 401 Unauthorized', true, 401 );
header('Content-type: text/plain; ; charset="utf-8"' ); header('Content-type: text/plain; ; charset="utf-8"' );
if ( $c->test_mode ) header( "Request-ID: " . request_id() );
header( $auth_header ); header( $auth_header );
echo 'Please log in for access to this system.'; echo 'Please log in for access to this system.';
if ( isset($_SERVER['PHP_AUTH_USER']) ) { if ( isset($_SERVER['PHP_AUTH_USER']) ) {