fix(core): 纯 HTTP 启动 HTTP 服务(不需要 TLS,符合项目约束)
core 的 HTTP 服务仅供 gateway 内部代理,且 WAF 已在前端终止 TLS。 原代码强制加载 server.crt/server.key,但证书不存在,导致 core 无法启动, 所有请求被 gateway 返回 500 'Internal Server Error'。 修复:使用无 TLS 的 3 参数 HttpServer 构造函数,纯 HTTP 启动。
This commit is contained in:
1 parent
6a68b3393d
commit
1d7641cc89
1 file changed
+3
-1
@@ -53,7 +53,9 @@ namespace qing {
|
||||
|
||||
/* start callback 唤醒事件 */
|
||||
this->th->set_wake( [this](Thread& th) -> void {
|
||||
this->server = std::make_unique<pmc::net::HttpServer> ("127.0.0.1", port, "server.crt", "server.key", 4);
|
||||
// core 的 HTTP 服务仅供 gateway 内部代理转发(WAF 已终止 TLS)
|
||||
// 使用无证书的纯 HTTP 构造,不启用 TLS
|
||||
this->server = std::make_unique<pmc::net::HttpServer> ("127.0.0.1", port, 4);
|
||||
handler(*this->server);
|
||||
th.run();
|
||||
|
||||
|
||||
Reference in new issue
Block a user