mirror of
https://github.com/grocy/grocy.git
synced 2026-04-10 22:46:16 +02:00
Formatting
This commit is contained in:
parent
af24c402ec
commit
8bb1ff03ac
|
|
@ -27,7 +27,7 @@ class ReverseProxyAuthMiddleware extends AuthMiddleware
|
|||
if (!isset($_SERVER[GROCY_REVERSE_PROXY_AUTH_HEADER]))
|
||||
{
|
||||
// Variable is not set
|
||||
throw new \Exception('ReverseProxyAuthMiddleware: ' . GROCY_REVERSE_PROXY_AUTH_HEADER . ' env variable is missing, could not be found in $_SERVER array.');
|
||||
throw new \Exception('ReverseProxyAuthMiddleware: ' . GROCY_REVERSE_PROXY_AUTH_HEADER . ' env variable is missing (could not be found in $_SERVER array)');
|
||||
}
|
||||
|
||||
$username = $_SERVER[GROCY_REVERSE_PROXY_AUTH_HEADER];
|
||||
|
|
@ -36,8 +36,9 @@ class ReverseProxyAuthMiddleware extends AuthMiddleware
|
|||
// Variable is empty
|
||||
throw new \Exception('ReverseProxyAuthMiddleware: ' . GROCY_REVERSE_PROXY_AUTH_HEADER . ' env variable is invalid');
|
||||
}
|
||||
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
$username = $request->getHeader(GROCY_REVERSE_PROXY_AUTH_HEADER);
|
||||
if (count($username) !== 1)
|
||||
{
|
||||
|
|
@ -47,8 +48,6 @@ class ReverseProxyAuthMiddleware extends AuthMiddleware
|
|||
$username = $username[0];
|
||||
}
|
||||
|
||||
|
||||
|
||||
$user = $db->users()->where('username', $username)->fetch();
|
||||
if ($user == null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user