feat: add timeouts to all requests requests

This commit is contained in:
Iain Learmonth 2023-03-12 12:28:29 +00:00
parent 2498f408c8
commit fff38fa994
7 changed files with 10 additions and 7 deletions

View file

@ -16,7 +16,7 @@ class BlockExternalAutomation(BlockMirrorAutomation):
def fetch(self) -> None:
user_agent = {'User-agent': 'BypassCensorship/1.0'}
page = requests.get(app.config['EXTERNAL_CHECK_URL'], headers=user_agent)
page = requests.get(app.config['EXTERNAL_CHECK_URL'], headers=user_agent, timeout=30)
self._content = page.content
def parse(self) -> None: