mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 14:09:43 -08:00
support apache REDIRECT_* for remote user login
This commit is contained in:
parent
8cfa8d97b4
commit
efc644c960
|
@ -154,6 +154,9 @@ class LoginController extends Controller
|
||||||
{
|
{
|
||||||
$header_name = Setting::getSettings()->login_remote_user_header_name ?: 'REMOTE_USER';
|
$header_name = Setting::getSettings()->login_remote_user_header_name ?: 'REMOTE_USER';
|
||||||
$remote_user = $request->server($header_name);
|
$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)) {
|
if (Setting::getSettings()->login_remote_user_enabled == '1' && isset($remote_user) && ! empty($remote_user)) {
|
||||||
Log::debug("Authenticating via HTTP header $header_name.");
|
Log::debug("Authenticating via HTTP header $header_name.");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue