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

helpers.rb « tracking « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bf3cefb736cfca2e3b525f772744f14e924cd58b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Gitlab
  module Tracking
    module Helpers
      def dnt_enabled?
        Gitlab::Utils.to_boolean(request.headers['DNT'])
      end

      def trackable_html_request?
        request.format.html? && !dnt_enabled?
      end
    end
  end
end