Plugins: Support set body content in plugin routes (#32551)
Adds support for overriding the body and length in plugin routes.
This commit is contained in:
committed by
GitHub
parent
027e886997
commit
aad43869c3
@@ -70,6 +70,10 @@ func NewApiPluginProxy(ctx *models.ReqContext, proxyPath string, route *plugins.
|
||||
ctx.JsonApiErr(500, "Failed to render plugin headers", err)
|
||||
return
|
||||
}
|
||||
|
||||
if err := setBodyContent(req, route, data); err != nil {
|
||||
logger.Error("Failed to set plugin route body content", "error", err)
|
||||
}
|
||||
}
|
||||
|
||||
return &httputil.ReverseProxy{Director: director}
|
||||
|
||||
Reference in New Issue
Block a user