mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 15:37:45 +00:00
Fix wrong behavior of --allow-hosts options
This commit is contained in:
parent
ff759fa51b
commit
0a296817d6
@ -23,7 +23,7 @@ class HostMatcher:
|
||||
if self.handle in ["ignore", "tcp"]:
|
||||
return any(rex.search(host) for rex in self.regexes)
|
||||
else: # self.handle == "allow"
|
||||
return any(not rex.search(host) for rex in self.regexes)
|
||||
return not any(rex.search(host) for rex in self.regexes)
|
||||
|
||||
def __bool__(self):
|
||||
return bool(self.patterns)
|
||||
|
Loading…
Reference in New Issue
Block a user