Simplify code
This commit is contained in:
parent
99649ff9ea
commit
bc0e830758
@ -343,19 +343,9 @@ if (! function_exists('is_request_secure')) {
|
||||
function is_request_secure(): bool
|
||||
{
|
||||
$request = request();
|
||||
if ($request->server('HTTPS') == 'on') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($request->server('HTTP_X_FORWARDED_PROTO') == 'https') {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($request->server('HTTP_X_FORWARDED_SSL') == 'on') {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
return $request->server('HTTPS') === 'on'
|
||||
|| $request->server('HTTP_X_FORWARDED_PROTO') === 'https'
|
||||
|| $request->server('HTTP_X_FORWARDED_SSL') === 'on';
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user