Sha256: 9fc6a8165b70208f00d9b021147dab008149dca1e645ed1c9e08d995926b71e8

Contents?: true

Size: 368 Bytes

Versions: 3

Compression:

Stored size: 368 Bytes

Contents

module Rack
  module Options
    
    class Request
      
      def initialize(app)
        @app = app
      end
      
      def call(env)
        if env["REQUEST_METHOD"] =~ /OPTIONS/
          [200, {"Content-Type" => "text/html"}, ["Microsoft Office Protocol Discovery"]]
        else
          @app.call(env)
        end
      end
            
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
CodeOfficer-rack-options-request-0.0.0 lib/rack/options/request.rb
CodeOfficer-rack-options-request-2.0.0 lib/rack/options/request.rb
CodeOfficer-rack-options-request-2.0.1 lib/rack/options/request.rb