这应该是一个快速解决方案。因此,出于某种原因,我仍然无法在不返回 413 Request Entity Too Large 的情况下成功获得大于 1MB 的请求。
例如,使用以下配置文件和大小为 ~2MB 的请求,我在 nginx error.log 中收到以下错误消息:
*1 client intended to send too large body: 2666685 bytes,
Run Code Online (Sandbox Code Playgroud)
我尝试设置下面设置的配置,然后重新启动我的 nginx 服务器,但我仍然收到 413 错误。有什么我做错了吗?
server {
listen 8080;
server_name *****/api; (*omitted*)
client_body_in_file_only clean;
client_body_buffer_size 32K;
charset utf-8;
client_max_body_size 500M;
sendfile on;
send_timeout 300s;
listen 443 ssl;
location / {
try_files $uri @(*omitted*);
}
location @parachute_server {
include uwsgi_params;
uwsgi_pass unix:/var/www/(*omitted*)/(*omitted*).sock;
}
}
Run Code Online (Sandbox Code Playgroud)
预先感谢您的帮助!
归档时间: |
|
查看次数: |
14959 次 |
最近记录: |