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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/concerns/google_syndication_csp.rb')
-rw-r--r--app/controllers/concerns/google_syndication_csp.rb21
1 files changed, 0 insertions, 21 deletions
diff --git a/app/controllers/concerns/google_syndication_csp.rb b/app/controllers/concerns/google_syndication_csp.rb
deleted file mode 100644
index c55debe448b..00000000000
--- a/app/controllers/concerns/google_syndication_csp.rb
+++ /dev/null
@@ -1,21 +0,0 @@
-# frozen_string_literal: true
-
-module GoogleSyndicationCSP
- extend ActiveSupport::Concern
-
- ALLOWED_SRC = ['*.google.com/pagead/landing', 'pagead2.googlesyndication.com/pagead/landing'].freeze
-
- included do
- content_security_policy do |policy|
- next unless helpers.google_tag_manager_enabled? || policy.directives.present?
-
- connect_src_values = Array.wrap(
- policy.directives['connect-src'] || policy.directives['default-src']
- )
-
- connect_src_values.concat(ALLOWED_SRC) if helpers.google_tag_manager_enabled?
-
- policy.connect_src(*connect_src_values.uniq)
- end
- end
-end