From f351d0a3079d88d98934b7e9a48c2ffb4a3018a0 Mon Sep 17 00:00:00 2001 From: dequis Date: Tue, 14 Mar 2017 01:54:31 -0300 Subject: Match ~d and ~u filters against pretty_host too Changed the ~u filter in the console UI to match the behavior of mitmweb, which only matches against pretty_url, never against url. --- web/src/js/filt/filt.peg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/src/js/filt/filt.peg') diff --git a/web/src/js/filt/filt.peg b/web/src/js/filt/filt.peg index b2576661..12959474 100644 --- a/web/src/js/filt/filt.peg +++ b/web/src/js/filt/filt.peg @@ -96,7 +96,7 @@ function responseBody(regex){ function domain(regex){ regex = new RegExp(regex, "i"); function domainFilter(flow){ - return flow.request && regex.test(flow.request.host); + return flow.request && (regex.test(flow.request.host) || regex.test(flow.request.pretty_host)); } domainFilter.desc = "domain matches " + regex; return domainFilter; -- cgit v1.2.3