Skip to content

Commit

Permalink
Update DefaultController.php
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmunir committed Aug 27, 2020
1 parent e58b01b commit d9216e8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controllers/DefaultController.php
Expand Up @@ -18,7 +18,7 @@ class DefaultController extends \yii\web\Controller
*/
public function actionIndex($page = 'README.md')
{
if (strpos($page, '.png') !== false) {
if (preg_match('/^docs\/images\/image\d+\.png$/',$page)) {
$file = Yii::getAlias("@mdm/admin/{$page}");
return Yii::$app->getResponse()->sendFile($file);
}
Expand Down

0 comments on commit d9216e8

Please sign in to comment.