nginx代理静态资源的时候像png、jpg等等点击下载,不是浏览器打开需要设置
【nginx代理静态资源的时候像png、jpg等等点击下载,不是浏览器打开需要设置】location / {
if ($
request_filename ~* ^.*?.(html|doc|pdf|zip|docx)$) {
add_header Content-Disposition attachment;
add_header Content-Type application/octet-stream;
}
}
推荐阅读
- 事件代理
- 设计模式-代理模式-Proxy
- iOS,打Framework静态库
- java静态代理模式
- 监控nginx
- Android|Android JNI之静态注册(android studio)
- Kotlin基础(10)-代理模式在kotlin中的使用
- Linux|Linux 服务器nginx相关命令
- Nginx|Nginx Tomcat 构造https服务应对苹果要求
- Nginx详细教程