debian-mirror-gitlab/app/controllers/concerns/hotlink_interceptor.rb
2020-03-28 13:19:24 +05:30

15 lines
271 B
Ruby

# frozen_string_literal: true
module HotlinkInterceptor
extend ActiveSupport::Concern
def intercept_hotlinking!
return render_406 if Gitlab::HotlinkingDetector.intercept_hotlinking?(request)
end
private
def render_406
head :not_acceptable
end
end