mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-21 22:13:11 -06:00
Merge pull request #4015 from weimdall/develop
Forward REMOTE_USER (remote_user_guard auth mode)
This commit is contained in:
commit
56388e46f2
@ -67,9 +67,9 @@ class RemoteUserGuard implements Guard
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Get the user identifier from $_SERVER
|
// Get the user identifier from $_SERVER or apache filtered headers
|
||||||
$header = config('auth.guard_header', 'REMOTE_USER');
|
$header = config('auth.guard_header', 'REMOTE_USER');
|
||||||
$userID = request()->server($header) ?? null;
|
$userID = request()->server($header) ?? apache_request_headers()[$header] ?? null;
|
||||||
if (null === $userID) {
|
if (null === $userID) {
|
||||||
Log::error(sprintf('No user in header "%s".', $header));
|
Log::error(sprintf('No user in header "%s".', $header));
|
||||||
throw new FireflyException('The guard header was unexpectedly empty. See the logs.');
|
throw new FireflyException('The guard header was unexpectedly empty. See the logs.');
|
||||||
|
Loading…
Reference in New Issue
Block a user