Sha256: e278eed6e2a02bad61ce919cc7c0776192a0f9eed1a101a892b16157f72f97b8
Contents?: true
Size: 733 Bytes
Versions: 3
Compression:
Stored size: 733 Bytes
Contents
# frozen_string_literal: true module Aws module Plugins # @api private class RecursionDetection < Seahorse::Client::Plugin # @api private class Handler < Seahorse::Client::Handler def call(context) unless context.http_request.headers.key?('x-amzn-trace-id') if ENV['AWS_LAMBDA_FUNCTION_NAME'] && (trace_id = ENV['_X_AMZN_TRACE_ID']) context.http_request.headers['x-amzn-trace-id'] = trace_id end end @handler.call(context) end end # should be at the end of build so that # modeled traits / service customizations apply first handler(Handler, step: :build, order: 99) end end end
Version data entries
3 entries across 3 versions & 1 rubygems