Merge pull request #10245 from Sxderp/pr-support-appache-rewrite-redirect-headers-for-remote-user

support apache REDIRECT_* for remote user login
This commit is contained in:
snipe 2021-10-28 16:34:57 -07:00 committed by GitHub
commit 1895dd326f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -154,6 +154,9 @@ class LoginController extends Controller
{
$header_name = Setting::getSettings()->login_remote_user_header_name ?: 'REMOTE_USER';
$remote_user = $request->server($header_name);
if (!isset($remote_user)) {
$remote_user = $request->server('REDIRECT_'.$header_name);
}
if (Setting::getSettings()->login_remote_user_enabled == '1' && isset($remote_user) && ! empty($remote_user)) {
Log::debug("Authenticating via HTTP header $header_name.");