Skip to content

Commit

Permalink
fixed * patterns issue
Browse files Browse the repository at this point in the history
  • Loading branch information
raianand committed Feb 14, 2024
1 parent 3aa868c commit 03732fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/intercept.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class Interceptor:
def wildcard_to_regex(self, wildcard_domain):
regex_pattern = re.escape(wildcard_domain) # Escape special characters
regex_pattern = regex_pattern.replace(r'\*', '.*') # Replace wildcard with regex equivalent
regex_pattern = regex_pattern.replace(r'\\*', '.*') # Replace wildcard with regex equivalent
regex_pattern = '^' + regex_pattern + '$' # Ensure the pattern matches the entire string
return re.compile(regex_pattern)
Expand Down Expand Up @@ -292,4 +292,6 @@ addons = [Interceptor()] # pylint: disable=invalid-name
fs.writeFileSync('intercept.py', interceptDotPy)
}

createInterceptDotPy('mitmproxyuser')

module.exports = { createInterceptDotPy }

0 comments on commit 03732fd

Please sign in to comment.