jon*_*nny 9 nginx lighttpd .htaccess httpd.conf upload
是否可以将用户重定向到文件file too big
页面
当 POST 请求大小超过指定限制时?
我知道 max-request-size 选项,但它只提供不能重载的静态页面。
我正在考虑创建一个重写规则,它需要
来自请求正文的内容大小作为输入并重定向到错误页面
更新
现在我们使用 nginx 作为前端。有什么新建议吗?
kol*_*ack 19
您应该能够使用以下方法执行此操作:
server {
server_name example.com;
client_max_body_size 10m; # or whatever size limit you want
error_page 413 /custompage.html; # you can also use a named location here if you like
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
12293 次 |
最近记录: |