summaryrefslogtreecommitdiff
path: root/app/helpers/gitlab_script_tag_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/gitlab_script_tag_helper.rb')
-rw-r--r--app/helpers/gitlab_script_tag_helper.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/helpers/gitlab_script_tag_helper.rb b/app/helpers/gitlab_script_tag_helper.rb
index 467f3f7305b..f784bb69dd8 100644
--- a/app/helpers/gitlab_script_tag_helper.rb
+++ b/app/helpers/gitlab_script_tag_helper.rb
@@ -21,4 +21,12 @@ module GitlabScriptTagHelper
super
end
+
+ def preload_link_tag(source, options = {})
+ # Chrome requires a nonce, see https://gitlab.com/gitlab-org/gitlab/-/issues/331810#note_584964908
+ # It's likely to be a browser bug, but we need to work around it anyway
+ options[:nonce] = content_security_policy_nonce
+
+ super
+ end
end