mirror of
https://github.com/gitlabhq/gitlabhq.git
synced 2025-08-10 03:00:46 +00:00
18 lines
344 B
Ruby
18 lines
344 B
Ruby
# frozen_string_literal: true
|
|
|
|
module FlocOptOut
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
before_action :set_floc_opt_out_header, unless: :floc_enabled?
|
|
end
|
|
|
|
def floc_enabled?
|
|
Gitlab::CurrentSettings.floc_enabled
|
|
end
|
|
|
|
def set_floc_opt_out_header
|
|
response.headers['Permissions-Policy'] = 'interest-cohort=()'
|
|
end
|
|
end
|