nginx如何更改/修改代理标头响应?

时间:2014-04-19 10:31:41

标签: nginx proxy response

我正在使用nginx作为某些域的反向代理我的域配置就像那样,

server
        {
                listen       80;
                server_name www.mydomain.com mydomain.com;
                index index.html index.htm index.php default.html default.htm;
location / {
    proxy_buffering off;
    proxy_max_temp_file_size 0;
    proxy_pass http://www.domainresultget.com;
}}

此域名“www.domainresultget.com”的响应标头看起来像那样,

HTTP/1.1 200 OK
CF-RAY: 11d864fce3900a9c-PRG
Connection: keep-alive
Content-Disposition: attachment; filename="filename_title_download.exe"
Content-Length: 351744
Content-Type: application/x-msdownload
Date: Sat, 19 Apr 2014 10:24:48 GMT
Server: nginx
X-Powered-By: PHP/5.3.3

我想将文件名标题保存到变量中以备将来使用吗?我的意思是这个“filename_title_download.exe”我想将其保存到变量中。有人能解释我怎么做吗?

0 个答案:

没有答案