Class: Airfoil::Middleware::SetRequestId

Inherits:
Base
  • Object
show all
Defined in:
lib/airfoil/middleware/set_request_id.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Airfoil::Middleware::Base

Instance Method Details

#call(env) ⇒ Object



6
7
8
9
10
# File 'lib/airfoil/middleware/set_request_id.rb', line 6

def call(env)
  context = env[:context]
  ENV["AWS_REQUEST_ID"] = context.aws_request_id if context.present?
  @app.call(env)
end