optimize model router&mapper (#1866)

This commit is contained in:
澄潭
2025-03-09 23:07:49 +08:00
committed by GitHub
parent 9e6bd6d2cc
commit a0c334a7cb
4 changed files with 35 additions and 28 deletions

View File

@@ -44,8 +44,8 @@ static RegisterContextFactory register_ModelMapper(
namespace {
constexpr std::string_view SetDecoderBufferLimitKey =
"SetRequestBodyBufferLimit";
constexpr std::string_view DefaultMaxBodyBytes = "10485760";
"set_decoder_buffer_limit";
constexpr std::string_view DefaultMaxBodyBytes = "104857600";
} // namespace
@@ -166,6 +166,7 @@ FilterHeadersStatus PluginRootContext::onHeader(
}
removeRequestHeader(Wasm::Common::Http::Header::ContentLength);
setFilterState(SetDecoderBufferLimitKey, DefaultMaxBodyBytes);
LOG_INFO(absl::StrCat("SetRequestBodyBufferLimit: ", DefaultMaxBodyBytes));
return FilterHeadersStatus::StopIteration;
}