Quantcast
Channel: Nginx Forum - Nginx Mailing List - Russian
Viewing all articles
Browse latest Browse all 3102

x-accel-redirect и content-type text/html (4 replies)

$
0
0
Добрый день!

Собственно возникла проблема с 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; это временный костыль
}

Пока пользуюсь костылем. Что делать?

Viewing all articles
Browse latest Browse all 3102

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>