protected function checkRedirectAcceptable()
{
$acceptableTypes = Yii::$app->getRequest()->getAcceptableContentTypes();
if (empty($acceptableTypes) || count($acceptableTypes) === 1 && array_keys($acceptableTypes)[0] === '*/*') {
return true;
}
foreach ($acceptableTypes as $type => $params) {
if (in_array($type, $this->acceptableRedirectTypes, true)) {
return true;
}
}
return false;
}