gpt4 book ai didi

nginx - 客户端在 Nginx 中发送了无效的 header 行

转载 作者:行者123 更新时间:2023-12-03 07:41:53 25 4
gpt4 key购买 nike

在 Nginx 错误日志文件中,得到的错误为

client sent invalid header line: "LocalDBUser_CREATE|USERNAME: User1" while reading client request headers

如何解决此问题。

我的 Nginx Conf 文件是

#user  nobody;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
error_log logs/error.log info;

pid logs/nginx.pid;


events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;

#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';

#access_log logs/access.log main;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;
upstream uic_entry {
server 127.0.0.1:4005;
}

server {
listen 80;
server_name xxx.yyy.com;
underscores_in_headers on;
large_client_header_buffers 4 16k;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_read_timeout 200;

location / {
#root html;
#index index.html index.htm;
#return 503;
proxy_pass http://uic_entry;
}

请告诉我如何修复该错误

最佳答案

我想,你需要指令 ignore_invalid_headers off .

关于nginx - 客户端在 Nginx 中发送了无效的 header 行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24651289/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com