debian-mirror-gitlab/lib/gitlab/middleware/webhook_recursion_detection.rb
2022-03-02 08:16:31 +05:30

19 lines
362 B
Ruby

# 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