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

18 lines
337 B
Ruby

# 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