Block all/unblock all users on server block

This commit is contained in:
Mouse Reeve
2021-04-07 16:50:12 -07:00
parent 839ac061b7
commit ddba61f138
3 changed files with 13 additions and 2 deletions

View File

@ -70,7 +70,7 @@ def is_blocked_user_agent(request):
user_agent = request.headers.get("User-Agent")
if not user_agent:
return False
url = re.search(r"+https?://{:s}/?".format(regex.domain), user_agent)
url = re.search(r"https?://{:s}/?".format(regex.domain), user_agent).group()
domain = urlparse(url).netloc
if not domain:
# idk, we'll try again later with the actor