class Da99_Rack_Protect::No_Old_MSIE

Constants

UA

Public Class Methods

new(new_app) click to toggle source
# File lib/da99_rack_protect/0050_No_Old_MSIE.rb, line 7
def initialize new_app
  @app = new_app
end

Public Instance Methods

call(e) click to toggle source
# File lib/da99_rack_protect/0050_No_Old_MSIE.rb, line 11
def call e
  if e['HTTP_USER_AGENT'].to_s[UA] && $1.to_i < 9
    return DA99.response 400, :text, "Page inaccessible because you are using an old browser: MSIE #{$1}"
  end
  @app.call e
end