重启
sudo nginx -s reload
nginx配置转发
location / {root /home/workspace/fe/dist;index index.html;}location ~ /share {proxy_pass http://192.168.1.137:8080;add_header 'Content-Disposition' 'attachment;filename=$arg_attname';}
nginx改变预览地址为下载地址,并重命名
location ~ /share {proxy_pass http://192.168.1.137:8080;add_header 'Content-Disposition' 'attachment;filename=$arg_attname';}//前端请求时,地址结尾加上 ?attname=自定义的文件名
