mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 03:22:13 +00:00
[!!!] Added type definitions to property types
- Request: optimized getIp method and reversed the order so proxy is always checked first.
This commit is contained in:
@@ -17,18 +17,18 @@ class BaseCsrfVerifier implements IMiddleware
|
||||
* For example: /admin/*
|
||||
* @var array|null
|
||||
*/
|
||||
protected $except;
|
||||
protected ?array $except = null;
|
||||
|
||||
/**
|
||||
* Urls to include. Can be used to include urls from a certain path.
|
||||
* @var array|null
|
||||
*/
|
||||
protected $include;
|
||||
protected ?array $include = null;
|
||||
|
||||
/**
|
||||
* @var ITokenProvider
|
||||
*/
|
||||
protected $tokenProvider;
|
||||
protected ITokenProvider $tokenProvider;
|
||||
|
||||
/**
|
||||
* BaseCsrfVerifier constructor.
|
||||
|
||||
@@ -7,8 +7,8 @@ use Pecee\SimpleRouter\Exceptions\HttpException;
|
||||
|
||||
abstract class IpRestrictAccess implements IMiddleware
|
||||
{
|
||||
protected $ipBlacklist = [];
|
||||
protected $ipWhitelist = [];
|
||||
protected array $ipBlacklist = [];
|
||||
protected array $ipWhitelist = [];
|
||||
|
||||
protected function validate(string $ip): bool
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user