A platform for community discussion. Free, open, simple.
DEV: Update link to comment in robots.txt as 'allow' is allowed (#33227)
Natalie Tay9a3225681a58
diff --git a/app/controllers/robots_txt_controller.rb b/app/controllers/robots_txt_controller.rbindex 4b80c0ba3f8..dc2e2cdd815 100644--- a/app/controllers/robots_txt_controller.rb+++ b/app/controllers/robots_txt_controller.rb@@ -54,11 +54,10 @@ class RobotsTxtController < ApplicationControllerdeny_paths_googlebot + DISALLOWED_WITH_HEADER_PATHS.map { |p| Discourse.base_path + p }deny_all = ["#{Discourse.base_path}/"]- result = {- header:- "# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file",- agents: [],- }+ result = { header: <<~ROBOTS, agents: [] }+ # See https://datatracker.ietf.org/doc/rfc9309 for documentation on how to use the robots.txt file+ # Google uses the same format as the standard above. More info at https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt+ ROBOTSif SiteSetting.allowed_crawler_user_agents.present?SiteSetting