gitlab-org--gitlab-foss/lib/gitlab/robots_txt.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
337 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Gitlab
module RobotsTxt
def self.disallowed?(path)
parsed_robots_txt.disallowed?(path)
end
def self.parsed_robots_txt
@parsed_robots_txt ||= Parser.new(robots_txt)
end
def self.robots_txt
File.read(Rails.root.join('public', 'robots.txt'))
end
end
end