Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
x-accel-redirect и content-type text/html
- To: nginx-ru@xxxxxxxxx
- Subject: x-accel-redirect и content-type text/html
- From: "ruNovel" <nginx-forum@xxxxxxxx>
- Date: Fri, 14 Feb 2014 03:31:33 -0500
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=selenium.jlkhosting.com; s=x; h=Date:Sender:From:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To; bh=Cdf8HfO7jlS5cPFwyo99jAX02Ii8loe573HJ1PnDc+Y=; b=e5C1pGYGrYQszIBtQ1QhLnEWPQdAFhOT/ZZkANQjHWiegMVl5BzcNSDSoknr2uQzt9fF2+SRJ00DnsSY/e2ONqsgmx4asrorIsi8x01VGBdddbVqBzJLwOBW1AA6M1XJorlXzxW/JMvDF76945R/4JAily3Ea/4HyBNl0tq0WvI=;
Добрый день!
Собственно возникла проблема с 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; это временный костыль
}
Пока пользуюсь костылем. Что делать?
Posted at Nginx Forum:
http://forum.nginx.org/read.php?21,247538,247538#msg-247538
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru
|