mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 01:05:11 +08:00
prefix the robots.txt rules with the directory when using subfolder
This commit is contained in:
@ -3,6 +3,14 @@ require 'rails_helper'
|
||||
RSpec.describe RobotsTxtController do
|
||||
describe '#index' do
|
||||
|
||||
context 'subfolder' do
|
||||
it 'prefixes the rules with the directory' do
|
||||
Discourse.stubs(:base_uri).returns('/forum')
|
||||
get '/robots.txt'
|
||||
expect(response.body).to include("\nDisallow: /forum/admin")
|
||||
end
|
||||
end
|
||||
|
||||
context 'crawl delay' do
|
||||
it 'allows you to set crawl delay on particular bots' do
|
||||
SiteSetting.allow_index_in_robots_txt = true
|
||||
|
Reference in New Issue
Block a user