mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 05:02:24 +08:00
3a7b696703
Also moved to default crawl delay bing so no more than a req every 5 seconds is allowed New site settings: "slow_down_crawler_user_agents" - list of crawlers that will be slowed down "slow_down_crawler_rate" - how many seconds to wait between requests Not enforced server side yet
47 lines
1.1 KiB
Plaintext
47 lines
1.1 KiB
Plaintext
# See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
|
|
#
|
|
<% @allowed_user_agents.each do |user_agent| %>
|
|
User-agent: <%= user_agent %>
|
|
<% end %>
|
|
Disallow: /auth/cas
|
|
Disallow: /auth/facebook/callback
|
|
Disallow: /auth/twitter/callback
|
|
Disallow: /auth/google/callback
|
|
Disallow: /auth/yahoo/callback
|
|
Disallow: /auth/github/callback
|
|
Disallow: /auth/cas/callback
|
|
Disallow: /assets/browser-update*.js
|
|
Disallow: /users/
|
|
Disallow: /u/
|
|
Disallow: /badges/
|
|
Disallow: /search
|
|
Disallow: /search/
|
|
Disallow: /tags
|
|
Disallow: /tags/
|
|
Disallow: /email/
|
|
Disallow: /session
|
|
Disallow: /session/
|
|
Disallow: /admin
|
|
Disallow: /admin/
|
|
Disallow: /user-api-key
|
|
Disallow: /user-api-key/
|
|
Disallow: /*?api_key*
|
|
Disallow: /*?*api_key*
|
|
Disallow: /groups
|
|
Disallow: /groups/
|
|
|
|
<% if @disallowed_user_agents %>
|
|
<% @disallowed_user_agents.each do |user_agent| %>
|
|
User-agent: <%= user_agent %>
|
|
Disallow: /
|
|
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<%= server_plugin_outlet "robots_txt_index" %>
|
|
|
|
<% @crawler_delayed_agents.each do |agent, delay| %>
|
|
User-agent: <%= agent %>
|
|
Crawl-delay: <%= delay %>
|
|
<% end %>
|