mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 16:31:09 +08:00
FIX: use allowlist and blocklist terminology (#10209)
This is a PR of the renaming whitelist to allowlist and blacklist to the blocklist.
This commit is contained in:

committed by
GitHub

parent
5077cf52fd
commit
e0d9232259
@ -55,15 +55,15 @@ class RobotsTxtController < ApplicationController
|
||||
agents: []
|
||||
}
|
||||
|
||||
if SiteSetting.whitelisted_crawler_user_agents.present?
|
||||
SiteSetting.whitelisted_crawler_user_agents.split('|').each do |agent|
|
||||
if SiteSetting.allowed_crawler_user_agents.present?
|
||||
SiteSetting.allowed_crawler_user_agents.split('|').each do |agent|
|
||||
result[:agents] << { name: agent, disallow: deny_paths }
|
||||
end
|
||||
|
||||
result[:agents] << { name: '*', disallow: deny_all }
|
||||
elsif SiteSetting.blacklisted_crawler_user_agents.present?
|
||||
elsif SiteSetting.blocked_crawler_user_agents.present?
|
||||
result[:agents] << { name: '*', disallow: deny_paths }
|
||||
SiteSetting.blacklisted_crawler_user_agents.split('|').each do |agent|
|
||||
SiteSetting.blocked_crawler_user_agents.split('|').each do |agent|
|
||||
result[:agents] << { name: agent, disallow: deny_all }
|
||||
end
|
||||
else
|
||||
|
Reference in New Issue
Block a user