Sha256: a00f6f196dfebaafebb43533ddaca114026a971894a231f2271032fd5dc80d6b

Contents?: true

Size: 328 Bytes

Versions: 1

Compression:

Stored size: 328 Bytes

Contents

require 'uuid'
require 'sitehub/constants'
class SiteHub
  module Middleware
    class TransactionId
      include Constants

      def initialize(app)
        @app = app
      end

      def call(env)
        env[RackHttpHeaderKeys::TRANSACTION_ID] ||= UUID.generate(:compact)
        @app.call env
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sitehub-0.4.6 lib/sitehub/middleware/transaction_id.rb