Добрый день!
Собственно возникла проблема с X-Accel-Redirect. Он постоянно отдает content type - text/hrml.
Вот скрипт который обрабатывает отдачу файла:
header("Pragma: public");
header("Expires: 0");
header('Content-Description: File Transfer');
header('Content-Length: ' . filesize($realFile));
header('Content-Disposition: attachment; filename=' . $filename . '');
header('Content-Transfer-Encoding: binary');
header('Content-Type: application/pdf', true);
header('X-Accel-Redirect: ' . $aliasedFile);
Конфиг на Nginx
location /files {
internal;
root /var/www/site.com/www;
gzip off;
#add_header Content-Type application/pdf; это временный костыль
}
Пока пользуюсь костылем. Что делать?