简体   繁体   English

入口 nginx:413 请求实体太大

[英]Ingress nginx: 413 Request Entity Too Large

I use ingress-nginx with Helm Chart.我将 ingress-nginx 与 Helm Chart 一起使用。 I used to have the problem, that when I would upload a file ZIP (400MB) that I would get the error 413 Request Entity Too Large nginx.我曾经遇到过这个问题,当我上传一个 ZIP 文件(400MB)时,我会收到错误 413 Request Entity Too Large nginx。

So I changed the proxy-body-size value in my values.yaml file to 800m所以我将 values.yaml 文件中的 proxy-body-size 值更改为 800m

values:价值观:

ingress:
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/proxy-body-size: 800m

but it's not working.但它不工作。 I try to upload file image 10MB, It's still well working.我尝试上传 10MB 的文件图像,它仍然可以正常工作。

How can I fix it?我该如何解决?

Thank for your support.感谢您的支持。

The annotation nginx.ingress.kubernetes.io/proxy-body-size is not longer being applied and the correct one would be:注释nginx.ingress.kubernetes.io/proxy-body-size不再被应用,正确的是:

annotations:注释:

nginx.org/client-max-body-size: "800m"

Refer to this link and Stack post for more information.有关详细信息,请参阅此链接Stack 帖子

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM