Skip to content

Commit e4334f1

Browse files
committed
add props to service_config (not final)
1 parent 693faa3 commit e4334f1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

aikido_zen/background_process/service_config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ def __init__(
2222
self.update(
2323
endpoints, last_updated_at, blocked_uids, bypassed_ips, received_any_stats
2424
)
25+
self.block_new_outgoing_requests = False
26+
self.domains = {}
2527

2628
def update(
2729
self,
@@ -74,6 +76,8 @@ def set_bypassed_ips(self, bypassed_ips):
7476
def is_bypassed_ip(self, ip):
7577
"""Checks if the IP is on the bypass list"""
7678
return self.bypassed_ips.has(ip)
79+
def update_domains(self, domains):
80+
self.domains = {domain["hostname"]: domain["mode"] for domain in domains}
7781
def should_block_outgoing_request(self, hostname: str) -> bool:
7882
mode = self.domains.get(hostname)
7983

0 commit comments

Comments
 (0)