Fallback to jsonpath for response filter

This commit is contained in:
Gregory Schier
2025-10-31 09:45:29 -07:00
parent c01b8ce4ca
commit 2bcf67aaa6

View File

@@ -858,10 +858,11 @@ impl PluginManager {
content: &str, content: &str,
content_type: &str, content_type: &str,
) -> Result<FilterResponse> { ) -> Result<FilterResponse> {
let plugin_name = if content_type.to_lowercase().contains("json") { let ct = content_type.to_lowercase();
"@yaak/filter-jsonpath" let plugin_name = if ct.contains("xml") || ct.contains("html") {
} else {
"@yaak/filter-xpath" "@yaak/filter-xpath"
} else {
"@yaak/filter-jsonpath"
}; };
let plugin = self let plugin = self