nginx lua 文件下載 ( nginx.conf文件裏添加 )nginx
# Lua非阻塞IO location = /oo { content_by_lua ' local res = ngx.location.capture("/O8ZW0WXJN.jpg") if res.status == 200 then ngx.header["Content-Disposition"] = "attachment; filename=O8ZW0WXJN.jpg" ngx.header["Content-Type"] ="image/png" ngx.print(res.body ) end '; }