Sha256: 3af5bb384011089867713dded8456a8726213ca57022db7698df00f44b4cf64d
Contents?: true
Size: 381 Bytes
Versions: 17
Compression:
Stored size: 381 Bytes
Contents
# frozen_string_literal: true class RobotsTxtServlet < WEBrick::HTTPServlet::AbstractServlet def do_GET(req, res) if /301/ === req['Host'] && req.path == '/robots.txt' res['Location'] = 'http://301/robots_txt' res.code = 301 else res['Content-Type'] = 'text/plain' res.body = <<-'EOF' User-Agent: * Disallow: /norobots EOF end end end
Version data entries
17 entries across 17 versions & 1 rubygems