【发布时间】:2017-03-12 16:02:26
【问题描述】:
我需要在某些 url 甚至全局应用程序上使用 - client_max_body_size 属性(通过 nginx.conf)限制最大正文大小。
我发现这个属性记录在 nginx 网站上:
Syntax: client_max_body_size size; Default: client_max_body_size 1m; Context: http, server, location Sets the maximum allowed size of the client request body, specified in the “Content-Length” request header field. If the size in一个请求超过了配置的值,413(Request Entity Too 大)错误返回给客户端。请注意浏览器 无法正确显示此错误。将大小设置为 0 禁用 检查客户端请求正文大小。
我需要将此属性设置为我的应用程序的某个部分(不是全局),所以我想将其设置为指定的 url,例如http://localhost:8088/x/#/y(# 是强制性的)
这个特定网址的语法是什么?有可能吗?
【问题讨论】: