From 1d7641cc89b77a5ef5661bca06839eebea4ea61c Mon Sep 17 00:00:00 2001 From: qing <1776177662@qq.com> Date: Tue, 4 Aug 2026 21:11:35 +0800 Subject: [PATCH] =?UTF-8?q?fix(core):=20=E7=BA=AF=20HTTP=20=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=20HTTP=20=E6=9C=8D=E5=8A=A1=EF=BC=88=E4=B8=8D?= =?UTF-8?q?=E9=9C=80=E8=A6=81=20TLS=EF=BC=8C=E7=AC=A6=E5=90=88=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E7=BA=A6=E6=9D=9F=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit core 的 HTTP 服务仅供 gateway 内部代理,且 WAF 已在前端终止 TLS。 原代码强制加载 server.crt/server.key,但证书不存在,导致 core 无法启动, 所有请求被 gateway 返回 500 'Internal Server Error'。 修复:使用无 TLS 的 3 参数 HttpServer 构造函数,纯 HTTP 启动。 --- core/src/main/HttpTask.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/main/HttpTask.cpp b/core/src/main/HttpTask.cpp index 2a0ad55..148c7e8 100644 --- a/core/src/main/HttpTask.cpp +++ b/core/src/main/HttpTask.cpp @@ -53,7 +53,9 @@ namespace qing { /* start callback 唤醒事件 */ this->th->set_wake( [this](Thread& th) -> void { - this->server = std::make_unique ("127.0.0.1", port, "server.crt", "server.key", 4); + // core 的 HTTP 服务仅供 gateway 内部代理转发(WAF 已终止 TLS) + // 使用无证书的纯 HTTP 构造,不启用 TLS + this->server = std::make_unique ("127.0.0.1", port, 4); handler(*this->server); th.run();