Sha256: b023cb8fdefb1eeb4a4193996084ac9242607797754639b0c672bfe5395440a8

Contents?: true

Size: 236 Bytes

Versions: 3

Compression:

Stored size: 236 Bytes

Contents

require 'faraday'

module Plaza
  module Middleware
    class UserId < Faraday::Middleware
      def call(env)
        env.request_headers[:x_user_id] = Thread.current[:x_user_id].to_s
        @app.call(env)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
plaza-0.1.1 lib/plaza/middleware/user_id.rb
plaza-0.1.0 lib/plaza/middleware/user_id.rb
plaza-0.0.4 lib/plaza/middleware/user_id.rb