Property | Type | Description | |
---|---|---|---|
$allowedHosts | list of host names, which are allowed. Each host can be specified as a wildcard pattern. For example: php [ 'example.com', '*.example.com', ] This field can be specified as a PHP callback of following signature: php function (\yii\base\Action $action) { return array of strings } where $action is the current [[\yii\base\Action|action]] object. If this field is not set - no host name check will be performed. | ||
$denyCallback | a callback that will be called if the current host does not match [[allowedHosts]]. If not set, HostControl::denyAccess will be called. The signature of the callback should be as follows: php function (\yii\base\Action $action) where $action is the current [[\yii\base\Action|action]] object. > Note: while implementing your own host deny processing, make sure you avoid usage of the current requested host name, creation of absolute URL links, caching page parts and so on. |
Method | Description | |
---|---|---|
beforeAction ( $action ) |
Method | Description | |
---|---|---|
denyAccess ( |
Denies the access. |
protected denyAccess ( |
||
$action | the action to be executed. |
public $allowedHosts |
public $denyCallback |