location /redirect/2 {
proxy_pass http://$arg_destIp:$arg_destPort/;
proxy_set_header Data $arg_hDate;
proxy_set_header Authorization $arg_hAuthorization;
proxy_set_header Content-Type $arg_hContentType;
proxy_set_header Content-Length $content_length;
add_header Content-Type "application/octet-stream";#这个属性就是用来设置response的头信息的
add_header Content-Disposition "attachment;filename=pic.jpg";
}
转载于:https://my.oschina.net/ffse54s/blog/1501216