gitlab-org--gitlab-foss/lib/gitlab/middleware/webhook_recursion_detection.rb

20 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