Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-03 18:08:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-03 18:08:33 +0300
commit511e761b41b81484c85e3d125f45873ce38e9201 (patch)
tree6bb98a6356de6e1d736951d2eef6ec83e6aa3dd2 /lib/gitlab/middleware
parent4247e67be1faa9d52691757dad954a7fa63e8bfe (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/middleware')
-rw-r--r--lib/gitlab/middleware/correlation_id.rb31
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/gitlab/middleware/correlation_id.rb b/lib/gitlab/middleware/correlation_id.rb
deleted file mode 100644
index fffd5da827f..00000000000
--- a/lib/gitlab/middleware/correlation_id.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-# frozen_string_literal: true
-
-# A dumb middleware that steals correlation id
-# and sets it as a global context for the request
-module Gitlab
- module Middleware
- class CorrelationId
- include ActionView::Helpers::TagHelper
-
- def initialize(app)
- @app = app
- end
-
- def call(env)
- ::Labkit::Correlation::CorrelationId.use_id(correlation_id(env)) do
- @app.call(env)
- end
- end
-
- private
-
- def correlation_id(env)
- request(env).request_id
- end
-
- def request(env)
- ActionDispatch::Request.new(env)
- end
- end
- end
-end