summaryrefslogtreecommitdiff
path: root/lib/gitlab/middleware/static.rb
blob: aa1e9dc0fdb1e55270416dccad4de63beb7fa2fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module Gitlab
  module Middleware
    class Static < ActionDispatch::Static
      UPLOADS_REGEX = %r{\A/uploads(/|\z)}.freeze

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

        super
      end
    end
  end
end