蒦嗳伱 发表于 2018-11-15 06:33:47

配置nginx指定文件格式下载

if ($request_filename ~* ^.*?\.(txt|mp4|mp3|mov|acc|m4a|rar|zip)$)  
{
  
add_header Content-type 'application/octet-stream;';
  
add_header Accept-Ranges 'bytes;';
  
add_header Content-Disposition 'attachment;';
  
}


页: [1]
查看完整版本: 配置nginx指定文件格式下载