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

16 lines
288 B
Ruby
Raw Normal View History

2018-12-23 12:14:25 +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