2019-02-15 15:39:39 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-04-26 12:48:37 +05:30
|
|
|
module Gitlab
|
|
|
|
module Middleware
|
|
|
|
class Static < ActionDispatch::Static
|
2018-03-17 18:26:18 +05:30
|
|
|
UPLOADS_REGEX = %r{\A/uploads(/|\z)}.freeze
|
2015-04-26 12:48:37 +05:30
|
|
|
|
|
|
|
def call(env)
|
|
|
|
return @app.call(env) if env['PATH_INFO'] =~ UPLOADS_REGEX
|
|
|
|
|
|
|
|
super
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|