From bcbf76a6281411b430639c58ca694bdc856fee72 Mon Sep 17 00:00:00 2001 From: Pierre Gordon Date: Fri, 19 Apr 2019 13:43:12 -0500 Subject: [PATCH] Only handle types "allow", "ignore" & "tcp" --- mitmproxy/proxy/config.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mitmproxy/proxy/config.py b/mitmproxy/proxy/config.py index 55969d5ee..75e372ae6 100644 --- a/mitmproxy/proxy/config.py +++ b/mitmproxy/proxy/config.py @@ -25,10 +25,8 @@ class HostMatcher: host = "%s:%s" % address if self.handle in ["ignore", "tcp"]: return any(rex.search(host) for rex in self.regexes) - elif self.handle == "allow": + else: # self.handle == "allow" return any(not rex.search(host) for rex in self.regexes) - else: - return False def __bool__(self): return bool(self.patterns)