gpt4 book ai didi

nginx - 如何修复 nginx 在任何 header 测试工具上抛出 400 个错误的请求 header ?

转载 作者:行者123 更新时间:2023-12-03 10:18:42 24 4
gpt4 key购买 nike

我有我的网站,它使用 nginx,测试网站使用 header 测试工具,例如http://www.webconfs.com/http-header-check.php但是每次它说下面的 400 个错误请求时都是该工具的输出。虽然我的所有页面在浏览器中都加载得很好,但当我在 chrome 控制台中看到它时,它显示状态代码 200OK。

HTTP/1.1 400 Bad Request => 
Server => nginx
Date => Fri, 07 Sep 2012 09:40:09 GMT
Content-Type => text/html
Content-Length => 166
Connection => close

我真的不明白我的服务器配置有什么问题?

一些谷歌搜索建议使用增加缓冲区大小,我将其增加到以下内容:
large_client_header_buffers 4 16k;

同样的结果仍然存在。

有人可以引导我走向正确的方向吗?

最佳答案

正如马克西姆·杜宁 (Maxim Dounin) 在 the comments above 中所述:

When nginx returns 400 (Bad Request) it will log the reason into error log, at "info" level. Hence an obvious way to find out what's going on is to configure error_log to log messages at "info" level and take a look into error log when testing.

关于nginx - 如何修复 nginx 在任何 header 测试工具上抛出 400 个错误的请求 header ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12315832/

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