mirror of
https://github.com/vee1e/mitmproxy.git
synced 2026-09-04 19:57:16 +00:00
Merge pull request #3826 from BlownSnail/fixing
Fix wrong behavior of --allow-hosts options
This commit is contained in:
commit
cc5fa2d0ef
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue