Sha256: 18086ef8ae0583160406fe35e00d73028351ff47ef9c17fac3f65227c809626e

Contents?: true

Size: 325 Bytes

Versions: 7

Compression:

Stored size: 325 Bytes

Contents

require 'grape/middleware/base'

module Grape
  module Middleware
    class Globals < Base
      def before
        @env['grape.request'] = Grape::Request.new(@env)
        @env['grape.request.headers'] = request.headers
        @env['grape.request.params'] = request.params if @env['rack.input']
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
grape-security-0.8.0 lib/grape/middleware/globals.rb
grape-0.11.0 lib/grape/middleware/globals.rb
grape-0.10.1 lib/grape/middleware/globals.rb
grape-0.10.0 lib/grape/middleware/globals.rb
grape-0.9.0 lib/grape/middleware/globals.rb
grape-0.8.0 lib/grape/middleware/globals.rb
grape-0.7.0 lib/grape/middleware/globals.rb