class IgnoreGoogleIndex::Rack
Public Class Methods
new(app)
click to toggle source
# File lib/ignore_google_index/rack.rb, line 3 def initialize(app) @app = app end
Public Instance Methods
call(env)
click to toggle source
# File lib/ignore_google_index/rack.rb, line 7 def call(env) status, headers, response = @app.call(env) if ENV['IGNORE_GOOGLE_INDEX'] == '1' headers['X-Robots-Tag'] = 'none' end [status, headers, response] end