发布于2020年3月9日2020年3月9日 由shidaoziNginx使用return指令,会下载文件 Nginx使用return指令,希望能够返回字符串的输出,结果会变成下载文件,解决方法如下: 配置返回内容的编码格式,例如: location /test { default_type text/html ; return 200 “hello $remote_addr”; }