2020-03-13 15:44:24 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module Middleware
|
|
|
|
class RequestContext
|
|
|
|
def initialize(app)
|
|
|
|
@app = app
|
|
|
|
end
|
|
|
|
|
|
|
|
def call(env)
|
2023-07-09 08:55:56 +05:30
|
|
|
request = ActionDispatch::Request.new(env)
|
|
|
|
Gitlab::RequestContext.start_request_context(request: request)
|
|
|
|
Gitlab::RequestContext.start_thread_context
|
2020-03-13 15:44:24 +05:30
|
|
|
|
|
|
|
@app.call(env)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|