В htaccess стоит редирект:Mixed Content: The site at 'https://planfix.ru/' was loaded over a secure connection, but the file at 'https://mysite.ru/home/getrecords?file= ... sip.ru.mp3' was redirected through an insecure connection. This file should be served over HTTPS. This download has been blocked. See https://blog.chromium.org/2020/02/prote ... ecure.html for more details.
RewriteRule ^docs\/records\/(.*)$ https://%{HTTP_HOST}\/home\/getrecords?file=$1 [L,QSA]
Это сделано для того, чтобы файл мог скачать только залогиненый пользователь.
Вот метод на который ведет редирект:
Код: Выделить всё
public function actionGetRecords(){
if(!Yii::app()->user->isGuest && !empty($_GET['file']) && file_exists(Yii::app()->basePath ."/../docs/records/".$_GET['file'])) {
Yii::app()->request->sendFile(basename(Yii::app()->basePath ."/../docs/records/".$_GET['file']),file_get_contents(Yii::app()->basePath ."/../docs/records/".$_GET['file']));
} else {
throw new CHttpException(404);
}
}