gray-industries/loginator

View on GitHub
examples/rack/uuid.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Rack
  module Loginator
    # Log all the things.
    class Uuid
      attr_reader :app

      def call(env)
        env['X-REQUEST-UUID'] ||= SecureRandom.uuid
        @app.call(env)
      end
    end
  end
end