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

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

module Gitlab
  module Middleware
    class Static < ActionDispatch::Static
      UPLOADS_REGEX = %r{\A/uploads(/|\z)}

      def call(env)
        return @app.call(env) if UPLOADS_REGEX.match?(env['PATH_INFO'])

        super
      end
    end
  end
end