aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/state_impl
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-10-20 21:57:47 +0200
committerWojtek Kosior <koszko@koszko.org>2022-10-20 21:57:47 +0200
commit55b95d70b24cfa1b4703ae442a3c6d1781cc95aa (patch)
treec6a33b401af373d7591e46e21dede0609313a140 /src/hydrilla/proxy/state_impl
parent3beab050c339c51c484af9bcd8248ba8ebbbf4d4 (diff)
downloadhaketilo-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.py9
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;')