aboutsummaryrefslogtreecommitdiff
path: root/src/hydrilla/proxy/policies/rule.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/hydrilla/proxy/policies/rule.py')
-rw-r--r--src/hydrilla/proxy/policies/rule.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/hydrilla/proxy/policies/rule.py b/src/hydrilla/proxy/policies/rule.py
index c62f473..2a6d8cb 100644
--- a/src/hydrilla/proxy/policies/rule.py
+++ b/src/hydrilla/proxy/policies/rule.py
@@ -52,6 +52,10 @@ class BlockPolicy(base.Policy):
priority: t.ClassVar[base.PolicyPriority] = base.PolicyPriority._TWO
+ @property
+ def current_popup_settings(self) -> state.PopupSettings:
+ return self.haketilo_settings.default_popup_jsblocked
+
def _csp_to_clear(self, http_info: http_messages.FullHTTPInfo) \
-> t.Sequence[str]:
return script_csp_directives
@@ -94,7 +98,7 @@ class RuleBlockPolicyFactory(RulePolicyFactory):
def make_policy(self, haketilo_state: state.HaketiloState) \
-> RuleBlockPolicy:
"""...."""
- return RuleBlockPolicy(self.pattern)
+ return RuleBlockPolicy(haketilo_state.get_settings(), self.pattern)
@dc.dataclass(frozen=True, unsafe_hash=True) # type: ignore[misc]
@@ -103,4 +107,4 @@ class RuleAllowPolicyFactory(RulePolicyFactory):
def make_policy(self, haketilo_state: state.HaketiloState) \
-> RuleAllowPolicy:
"""...."""
- return RuleAllowPolicy(self.pattern)
+ return RuleAllowPolicy(haketilo_state.get_settings(), self.pattern)