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/helpers/gitlab_script_tag_helper.rb')
-rw-r--r--app/helpers/gitlab_script_tag_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/helpers/gitlab_script_tag_helper.rb b/app/helpers/gitlab_script_tag_helper.rb
index f784bb69dd8..55653c592e5 100644
--- a/app/helpers/gitlab_script_tag_helper.rb
+++ b/app/helpers/gitlab_script_tag_helper.rb
@@ -7,7 +7,9 @@ module GitlabScriptTagHelper
# The helper also makes sure the `nonce` attribute is included in every script when the content security
# policy is enabled.
def javascript_include_tag(*sources)
- super(*sources, defer: true, nonce: true)
+ options = { defer: true }.merge(sources.extract_options!)
+ options[:nonce] = true
+ super(*sources, **options)
end
# The helper makes sure the `nonce` attribute is included in every script when the content security