Welcome to mirror list, hosted at ThFree Co, Russian Federation.

hotlink_interceptor.rb « concerns « controllers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 712a10eab985d7e415d89789ac18aaeab488dc23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 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