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

webhook_recursion_detection.rb « middleware « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2677445852ceb416bf3d7ca3f86d9334d95d1a53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module Gitlab
  module Middleware
    class WebhookRecursionDetection
      def initialize(app)
        @app = app
      end

      def call(env)
        headers = ActionDispatch::Request.new(env).headers

        ::Gitlab::WebHooks::RecursionDetection.set_from_headers(headers)

        @app.call(env)
      end
    end
  end
end