Add Kling provider support (#3742)

Signed-off-by: wydream <yaodiwu618@gmail.com>
This commit is contained in:
woody
2026-05-14 16:18:00 +08:00
committed by GitHub
parent b032f344e6
commit a93847e07f
9 changed files with 1910 additions and 5 deletions

View File

@@ -264,8 +264,9 @@ func onHttpRequestHeader(ctx wrapper.HttpContext, pluginConfig config.PluginConf
return types.ActionContinue
}
_, hasRequestBodyHandler := activeProvider.(provider.RequestBodyHandler)
hasRequestBody := ctx.HasRequestBody()
if hasRequestBody {
if hasRequestBody && hasRequestBodyHandler {
_ = proxywasm.RemoveHttpRequestHeader("Content-Length")
ctx.SetRequestBodyBufferLimit(defaultMaxBodyBytes)
// Delay the header processing to allow changing in OnRequestBody