![](/img/trans.png)
[英]Configuring nginx client_max_body_size on Elastic Beanstalk Node
[英]Node/Nginx, 413 request entity too large, client_max_body_size set
非常類似於https://serverfault.com/questions/539466/413-request-entity-too-large-client-max-body-size-is-set
我已經在nginx(具體來說,dockerfile / nginx映像)上運行了一個節點服務器(使用回送),但是每當我對節點服務器執行大的PUT(或POST)請求時,我都會得到一個413響應。
我已經在許多地方設置了client_max_body_size(對我來說,在/etc/nginx/nginx.conf中),並設置了高估的值,但仍然得到413s ...我缺少什么嗎?
感謝Xavier Lucas,問題確實出在應用程序而不是nginx配置上,這是在此Github問題中建議的:
https://github.com/strongloop/loopback/issues/690
通過顯式設置json和urlencoded限制來解決。
我遇到同樣的錯誤,我的節點服務器使用koa-bodyparser ,它限制了urlencoded主體:
formLimit:urlencode主體的限制。 如果主體最終大於此限制,則返回413錯誤代碼。 默認值為56kb。
與nginx無關。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.