fix mail server and lint removal
This commit is contained in:
@@ -18,37 +18,37 @@ module BotBlocker
|
|||||||
|
|
||||||
# List of known bot user agents
|
# List of known bot user agents
|
||||||
bot_patterns = [
|
bot_patterns = [
|
||||||
'gptbot', # OpenAI GPTBot
|
"gptbot", # OpenAI GPTBot
|
||||||
'chatgpt', # ChatGPT
|
"chatgpt", # ChatGPT
|
||||||
'claude-web', # Anthropic Claude
|
"claude-web", # Anthropic Claude
|
||||||
'bingbot', # Microsoft Bing
|
"bingbot", # Microsoft Bing
|
||||||
'googlebot', # Google
|
"googlebot", # Google
|
||||||
'baiduspider', # Baidu
|
"baiduspider", # Baidu
|
||||||
'yandexbot', # Yandex
|
"yandexbot", # Yandex
|
||||||
'duckduckbot', # DuckDuckGo
|
"duckduckbot", # DuckDuckGo
|
||||||
'slurp', # Yahoo
|
"slurp", # Yahoo
|
||||||
'facebookexternalhit', # Facebook
|
"facebookexternalhit", # Facebook
|
||||||
'twitterbot', # Twitter
|
"twitterbot", # Twitter
|
||||||
'linkedinbot', # LinkedIn
|
"linkedinbot", # LinkedIn
|
||||||
'whatsapp', # WhatsApp
|
"whatsapp", # WhatsApp
|
||||||
'telegrambot', # Telegram
|
"telegrambot", # Telegram
|
||||||
'slackbot', # Slack
|
"slackbot", # Slack
|
||||||
'discordbot', # Discord
|
"discordbot", # Discord
|
||||||
'applebot', # Apple
|
"applebot", # Apple
|
||||||
'ia_archiver', # Alexa/Internet Archive
|
"ia_archiver", # Alexa/Internet Archive
|
||||||
'petalbot', # Huawei
|
"petalbot", # Huawei
|
||||||
'seznambot', # Seznam
|
"seznambot", # Seznam
|
||||||
'ahrefsbot', # Ahrefs
|
"ahrefsbot", # Ahrefs
|
||||||
'semrushbot', # SEMrush
|
"semrushbot", # SEMrush
|
||||||
'mj12bot', # Majestic
|
"mj12bot", # Majestic
|
||||||
'dotbot', # OpenSiteExplorer
|
"dotbot", # OpenSiteExplorer
|
||||||
'rogerbot', # Moz
|
"rogerbot", # Moz
|
||||||
'exabot', # Exalead
|
"exabot", # Exalead
|
||||||
'facebot', # Facebook
|
"facebot", # Facebook
|
||||||
'spider', # Generic spiders
|
"spider", # Generic spiders
|
||||||
'crawler', # Generic crawlers
|
"crawler", # Generic crawlers
|
||||||
'scraper', # Generic scrapers
|
"scraper", # Generic scrapers
|
||||||
'bot', # Generic bots (last resort)
|
"bot" # Generic bots (last resort)
|
||||||
]
|
]
|
||||||
|
|
||||||
bot_patterns.any? { |pattern| user_agent.include?(pattern) }
|
bot_patterns.any? { |pattern| user_agent.include?(pattern) }
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ Rails.application.configure do
|
|||||||
config.action_mailer.smtp_settings = {
|
config.action_mailer.smtp_settings = {
|
||||||
user_name: Rails.application.credentials.dig(:mail, :username),
|
user_name: Rails.application.credentials.dig(:mail, :username),
|
||||||
password: Rails.application.credentials.dig(:mail, :password),
|
password: Rails.application.credentials.dig(:mail, :password),
|
||||||
address: Rails.application.credentials.dig(:mail, :smtp_server),
|
address: Rails.application.credentials.dig(:mail, :server),
|
||||||
port: 587,
|
port: 587,
|
||||||
authentication: :plain
|
authentication: :plain
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user