debian-mirror-gitlab/lib/gitlab/middleware/request_context.rb
2023-07-09 08:55:56 +05:30

19 lines
392 B
Ruby

# frozen_string_literal: true
module Gitlab
module Middleware
class RequestContext
def initialize(app)
@app = app
end
def call(env)
request = ActionDispatch::Request.new(env)
Gitlab::RequestContext.start_request_context(request: request)
Gitlab::RequestContext.start_thread_context
@app.call(env)
end
end
end
end