proxy: drop text/event-stream requests

otherwise the proxy will die on a hang
This commit is contained in:
Vaxry
2025-04-15 16:19:55 +01:00
parent f4b9bb1294
commit 5d7f0bb322

View File

@@ -391,6 +391,12 @@ void CServerHandler::proxyPass(const Pistache::Http::Request& req, Pistache::Htt
continue;
}
if (HNAME == "Accept" && req.headers().getRaw(h->name()).value().contains("text/event-stream")) {
Debug::log(ERR, "FIXME: text/event-stream not supported via the proxy (it would have to be async)");
response.send(Pistache::Http::Code::Internal_Server_Error, "event-stream is not supported by checkpoint");
return;
}
Debug::log(TRACE, "Header in: {}: {}", h->name(), req.headers().getRaw(h->name()).value());
builder.header(h);
}