debian-mirror-gitlab/app/controllers/concerns/hotlink_interceptor.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
271 B
Ruby
Raw Normal View History

2020-03-28 13:19:24 +05:30
# 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