debian-mirror-gitlab/lib/gitlab/middleware/request_context.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
392 B
Ruby
Raw Normal View History

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