mirror of
https://github.com/meineerde/redmine.git
synced 2026-02-01 03:57:15 +00:00
use relative url at robots.txt (#27865)
git-svn-id: http://svn.redmine.org/redmine/trunk@17135 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
fca43b026e
commit
7a556764ef
@ -1,10 +1,10 @@
|
||||
User-agent: *
|
||||
<% @projects.each do |p| -%>
|
||||
Disallow: /projects/<%= p.to_param %>/repository
|
||||
Disallow: /projects/<%= p.to_param %>/issues
|
||||
Disallow: /projects/<%= p.to_param %>/activity
|
||||
Disallow: <%= url_for(:controller => 'repositories', :action => :show, :id => p) %>
|
||||
Disallow: <%= url_for(project_issues_path(:project_id => p)) %>
|
||||
Disallow: <%= url_for(project_activity_path(:id => p)) %>
|
||||
<% end -%>
|
||||
Disallow: /issues/gantt
|
||||
Disallow: /issues/calendar
|
||||
Disallow: /activity
|
||||
Disallow: /search
|
||||
Disallow: <%= url_for(issues_gantt_path) %>
|
||||
Disallow: <%= url_for(issues_calendar_path) %>
|
||||
Disallow: <%= url_for(activity_path) %>
|
||||
Disallow: <%= url_for(search_path) %>
|
||||
|
||||
@ -25,6 +25,7 @@ class WelcomeTest < Redmine::IntegrationTest
|
||||
get '/robots.txt'
|
||||
assert_response :success
|
||||
assert_equal 'text/plain', @response.content_type
|
||||
# It seems Redmine::Utils.relative_url_root does not effect on Rails 5.1.4
|
||||
assert @response.body.match(%r{^Disallow: /projects/ecookbook/issues\r?$})
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user