Sha256: e25e9884f65430a4072e1ebacda8b0a504e815cd02d2e89b917a6f980362e8ab

Contents?: true

Size: 264 Bytes

Versions: 5

Compression:

Stored size: 264 Bytes

Contents

module Diesel
  module Middleware
    class SetHeader
      def initialize(app, headers)
        @app = app
        @headers = headers
      end

      def call(env)
        env[:request_headers].merge!(@headers)
        @app.call(env)
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
diesel-api-dsl-0.1.5 lib/diesel/middleware/set_header.rb
diesel-api-dsl-0.1.3 lib/diesel/middleware/set_header.rb
diesel-api-dsl-0.1.2 lib/diesel/middleware/set_header.rb
diesel-api-dsl-0.1.1 lib/diesel/middleware/set_header.rb
diesel-api-dsl-0.1.0 lib/diesel/middleware/set_header.rb