diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-10-25 11:30:45 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-10-25 11:30:45 +0200 |
commit | 37b3cf9fb2a56cfa980844f527d834916b38cca8 (patch) | |
tree | 288a3b3ddc7e1fe115d568480f44313173183c2d /src/hydrilla/url_patterns.py | |
parent | 44c09ab27ce8407f4fc5c75df9cdf309df8463eb (diff) | |
download | haketilo-hydrilla-37b3cf9fb2a56cfa980844f527d834916b38cca8.tar.gz haketilo-hydrilla-37b3cf9fb2a56cfa980844f527d834916b38cca8.zip |
[proxy] make Haketilo popup functional
* Ad hoc payload creation was additionally fixed in this commit.
* Addition on newly created script blocking/allowing rules to pattern tree was additionally fixed in this commit. It is no longer necessary to restart Haketilo for new rules to come into effect.
Diffstat (limited to 'src/hydrilla/url_patterns.py')
-rw-r--r-- | src/hydrilla/url_patterns.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/hydrilla/url_patterns.py b/src/hydrilla/url_patterns.py index 5e62a28..860d456 100644 --- a/src/hydrilla/url_patterns.py +++ b/src/hydrilla/url_patterns.py @@ -242,4 +242,8 @@ def normalize_pattern(url_pattern: str) -> str: return reconstructed +def pattern_for_domain(url: str) -> str: + return normalize_pattern(f'http*://{up.urlparse(url).netloc}/***') + + dummy_url = parse_url('http://dummy.replacement.url') |