diff options
author | Wojtek Kosior <koszko@koszko.org> | 2022-10-20 21:57:47 +0200 |
---|---|---|
committer | Wojtek Kosior <koszko@koszko.org> | 2022-10-20 21:57:47 +0200 |
commit | 55b95d70b24cfa1b4703ae442a3c6d1781cc95aa (patch) | |
tree | c6a33b401af373d7591e46e21dede0609313a140 /src/hydrilla/proxy/state_impl | |
parent | 3beab050c339c51c484af9bcd8248ba8ebbbf4d4 (diff) | |
download | haketilo-hydrilla-55b95d70b24cfa1b4703ae442a3c6d1781cc95aa.tar.gz haketilo-hydrilla-55b95d70b24cfa1b4703ae442a3c6d1781cc95aa.zip |
[proxy] rework internal HTTP headers representation
Diffstat (limited to 'src/hydrilla/proxy/state_impl')
-rw-r--r-- | src/hydrilla/proxy/state_impl/concrete_state.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/hydrilla/proxy/state_impl/concrete_state.py b/src/hydrilla/proxy/state_impl/concrete_state.py index 83522cf..c28e360 100644 --- a/src/hydrilla/proxy/state_impl/concrete_state.py +++ b/src/hydrilla/proxy/state_impl/concrete_state.py @@ -223,6 +223,15 @@ class ConcreteHaketiloState(base.HaketiloStateWithFields): item = web_ui_landing_factory ) + mitm_it_page_pattern = 'http://mitm.it/***' + mitm_it_page_factory = policies.MitmItPagePolicyFactory() + + parsed_pattern, = url_patterns.parse_pattern(mitm_it_page_pattern) + new_policy_tree = new_policy_tree.register( + parsed_pattern = parsed_pattern, + item = mitm_it_page_factory + ) + # Put script blocking/allowing rules in policy tree. cursor.execute('SELECT pattern, allow_scripts FROM rules;') |