mirror of https://gitlab.com/bashrc2/epicyon
Block some ai crawlers
parent
62b893dd8d
commit
4c04d0f0ea
|
@ -127,7 +127,7 @@ def blocked_user_agent(calling_domain: str, agent_str: str,
|
|||
# unless this is a news instance or if it is in the allowed list
|
||||
bot_strings = ('bot/', 'bot-', '/bot', '/robot', 'gptbot',
|
||||
'-ai/', ' ai/', '-ai ', ' ai ', 'spider/',
|
||||
'externalhit/')
|
||||
'externalhit/', 'chatgpt')
|
||||
contains_bot_string = False
|
||||
for bot_str in bot_strings:
|
||||
if bot_str in agent_str_lower:
|
||||
|
|
Loading…
Reference in New Issue