summaryrefslogtreecommitdiff
path: root/lib/gitlab/middleware/timeout.rb
blob: 015600392b90747891880c85ee9b3e0e2e6b55b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module Gitlab
  module Middleware
    class Timeout < Rack::Timeout
      GRACK_REGEX = /[-\/\w\.]+\.git\//.freeze

      def call(env)
        return @app.call(env) if env['PATH_INFO'] =~ GRACK_REGEX

        super
      end
    end
  end
end