|
|
@ -66,20 +66,12 @@ class AppServiceProvider extends ServiceProvider |
|
|
|
$view->with('alt_bg', $alt_bg ); |
|
|
|
$view->with('allusers', $allusers ); |
|
|
|
$view->with('current_user', $current_user ); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (env('FORCE_HTTPS') === true) { |
|
|
|
\URL::forceScheme('https'); |
|
|
|
} |
|
|
|
|
|
|
|
if(env('APP_URL') != 'http://localhost') { |
|
|
|
\URL::forceRootUrl(env('APP_URL')); |
|
|
|
} |
|
|
|
if(isset($_SERVER['HTTP_AUTHORIZATION']) && !empty($_SERVER['HTTP_AUTHORIZATION'])) { |
|
|
|
list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = |
|
|
|
explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6))); |
|
|
|
} |
|
|
|
if(!\Auth::check()) { |
|
|
|
if(isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW'])) { |
|
|
|
$credentials = ['username' => $_SERVER['PHP_AUTH_USER'], 'password' => $_SERVER['PHP_AUTH_PW']]; |
|
|
|
|
|
|
@ -89,7 +81,20 @@ class AppServiceProvider extends ServiceProvider |
|
|
|
\Session::put('current_user', $user); |
|
|
|
//session(['current_user' => $user]); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
if (env('FORCE_HTTPS') === true) { |
|
|
|
\URL::forceScheme('https'); |
|
|
|
} |
|
|
|
|
|
|
|
if(env('APP_URL') != 'http://localhost') { |
|
|
|
\URL::forceRootUrl(env('APP_URL')); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|