admin管理员组文章数量:1122846
I am getting the following error while calling a rest endpoint with the following nginx configuration:
# inspired by
#
#
# /
error_log stderr;
pid /tmp/nginx.pid;
#
worker_rlimit_nofile 2048;
events {
# max simultaneous connections
# see also
worker_connections 1024;
}
http {
access_log stdout;
large_client_header_buffers 4 16k;
proxy_buffers
server {
client_max_body_size 4G;
listen 8443 ssl;
proxy_buffers 4 16k;
ssl_certificate /app/tls/cert.pem;
ssl_certificate_key /app/tls/key.pem;
# Set a number of log, temp and cache file options that will otherwise
# default to restricted locations accessible only to root.
client_body_temp_path /tmp/client_body;
proxy_temp_path /tmp/proxy_temp;
fastcgi_temp_path /tmp/fastcgi_temp;
uwsgi_temp_path /tmp/uwsgi_temp;
scgi_temp_path /tmp/scgi_temp;
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
# prevent connection between nginx and uvicorn from being closed
proxy_set_header Connection "";
proxy_redirect off;
proxy_pass http://uvicorn;
proxy_http_version 1.1;
}
}
upstream uvicorn {
server 127.0.0.1:8090;
keepalive 2;
}
}
Headers are 31.42 KB sized so, I thing large_client_header_buffers 4 16k;
should be enough. We are using uvicorn==0.26.0 and fastapi==0.110.0. Does anyone know why is it happening?
本文标签: nginx431 Request Header Fields Too LargeStack Overflow
版权声明:本文标题:nginx - 431 Request Header Fields Too Large - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736305371a1932566.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论