add tools request libs, migrate for hyperf framework
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Platform\Tools;
|
||||
|
||||
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\RequestMatcherInterface;
|
||||
use GuzzleHttp\Psr7\Uri;
|
||||
|
||||
class ToolsRequestMatcher implements RequestMatcherInterface
|
||||
{
|
||||
public function matches(Request $request): bool
|
||||
{
|
||||
$limit = (new Uri(HttpClient::getHost()))->getHost();
|
||||
return $limit === $request->getHost();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user