2021-05-07 05:10:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module FlocOptOut
|
|
|
|
extend ActiveSupport::Concern
|
|
|
|
|
|
|
|
included do
|
2022-03-09 01:07:38 -05:00
|
|
|
before_action :set_floc_opt_out_header, unless: :floc_enabled?
|
2021-05-07 05:10:27 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
def floc_enabled?
|
|
|
|
Gitlab::CurrentSettings.floc_enabled
|
|
|
|
end
|
|
|
|
|
|
|
|
def set_floc_opt_out_header
|
|
|
|
response.headers['Permissions-Policy'] = 'interest-cohort=()'
|
|
|
|
end
|
|
|
|
end
|