mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 08:12:17 +01:00
Refactored TrustHostsTest; Added return types to TrustHosts
This commit is contained in:
committed by
Gregor Vostrak
parent
80d98b30a1
commit
f6d886b218
@@ -19,7 +19,7 @@ class TrustHosts extends BaseTrustHosts
|
||||
/**
|
||||
* @return array<int, string|null>
|
||||
*/
|
||||
public function hosts()
|
||||
public function hosts(): array
|
||||
{
|
||||
/** @var array<int, string> $configured */
|
||||
$configured = config('app.trusted_hosts', []);
|
||||
@@ -40,9 +40,8 @@ class TrustHosts extends BaseTrustHosts
|
||||
|
||||
/**
|
||||
* @param \Closure(Request): Response $next
|
||||
* @return Response
|
||||
*/
|
||||
public function handle(Request $request, $next)
|
||||
public function handle(Request $request, $next): Response
|
||||
{
|
||||
// Exempt health checks (probed by IP). Also reset the trusted hosts,
|
||||
// since Octane leaks the static state across requests.
|
||||
|
||||
Reference in New Issue
Block a user