html tool

2021年5月10日星期一

转:nginx反向代理转发上传文件是否缓存

 参考:

https://blog.csdn.net/wuqing2012mxd/article/details/105768686

解决方案:根据官方文档说的把proxy_request_buffering设置成off,请求的正文就不会缓存,而是实时与代理服务器交互.


https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_request_buffering

Syntax:proxy_request_buffering on | off;
Default:
proxy_request_buffering on;
Context:httpserverlocation

This directive appeared in version 1.7.11.

Enables or disables buffering of a client request body.

When buffering is enabled, the entire request body is read from the client before sending the request to a proxied server.

When buffering is disabled, the request body is sent to the proxied server immediately as it is received. In this case, the request cannot be passed to the next server if nginx already started sending the request body.

没有评论:

发表评论