Files
gitlabhq/app/controllers/concerns/hotlink_interceptor.rb
2024-05-13 12:17:47 +00:00

16 lines
264 B
Ruby

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