Project

General

Profile

Defect #40208 » 40208-v2.patch

Go MAEDA, 2024-02-08 13:08

View differences:

config/routes.rb
match 'uploads', :to => 'attachments#upload', :via => :post
get 'robots', :to => 'welcome#robots'
get 'robots.:format', :to => 'welcome#robots', :constraints => {format: 'txt'}
Redmine::Plugin.directory.glob("*/config/routes.rb").sort.each do |plugin_routes_path|
instance_eval(plugin_routes_path.read, plugin_routes_path.to_s)
test/integration/welcome_test.rb
assert @response.body.match(%r{^Disallow: /\r?$})
end
end
def test_robots_should_not_respond_to_unsupported_formats
%w(robots.json robots).each do |file|
get "/#{file}"
assert_response :not_found
end
end
end
(2-2/2)