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

20 lines
362 B
Ruby
Raw Permalink Normal View History

2022-03-02 08:16:31 +05:30
# 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