Welcome! Log In Create A New Profile

Advanced

x-accel-redirect и content-type text/html

February 14, 2014 03:31AM
Добрый день!

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

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

x-accel-redirect и content-type text/html

ruNovel February 14, 2014 03:31AM

Re: x-accel-redirect и content-type text/html

Maxim Dounin February 14, 2014 08:28AM

Re: x-accel-redirect и content-type text/html

Dmitry February 14, 2014 08:44AM

Re: x-accel-redirect и content-type text/html

ruNovel February 15, 2014 02:22AM

Re: x-accel-redirect и content-type text/html

Dmitry February 15, 2014 06:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 66
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 254 on July 05, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready