(resp pluginapi.ManagementResponse)
| 341 | } |
| 342 | |
| 343 | func escapeManagementResponseBody(resp pluginapi.ManagementResponse) []byte { |
| 344 | body, okEscaped := htmlsanitize.JSONBodyIfLikely(resp.Body, resp.Headers.Get("Content-Type")) |
| 345 | if !okEscaped { |
| 346 | return resp.Body |
| 347 | } |
| 348 | return body |
| 349 | } |
| 350 | |
| 351 | func (h *Host) callResourceHandler(ctx context.Context, record resourceRouteRecord, req pluginapi.ManagementRequest) (resp pluginapi.ManagementResponse, err error) { |
| 352 | if h == nil || record.route.Handler == nil || h.isPluginFused(record.pluginID) || !h.pluginIdentityCurrent(record.pluginID, record.path, record.version) { |
no test coverage detected