mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 01:35:34 +08:00
FIX: new relic CSP [SCI-8118][SCI-8119] (#5430)
Switch to newRelic manual browser agent using a nonce [SCI-8118][SCI-8119]
This commit is contained in:
parent
2adb908dc0
commit
351ba06840
5 changed files with 12 additions and 1 deletions
|
@ -22,3 +22,5 @@ function pageNumbers() {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
$('#reports-footer-header-template').on('load', pageNumbers);
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
<%= stylesheet_link_tag "tailwind", "data-turbo-track": "reload" %>
|
||||
<%= stylesheet_link_tag 'application', media: 'all' %>
|
||||
|
||||
<% if ::NewRelic::Agent.instance.started? %>
|
||||
<%= ::NewRelic::Agent.browser_timing_header("nonce") %>
|
||||
<% end %>
|
||||
<%= javascript_include_tag 'jquery_bundle' %>
|
||||
<%= javascript_include_tag 'application' %>
|
||||
<%= javascript_include_tag 'application_pack' %>
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
<meta charset='utf-8' />
|
||||
<%= javascript_include_tag wicked_pdf_asset_base64("reports/template_helpers") %>
|
||||
</head>
|
||||
<body onload="pageNumbers()">
|
||||
<body id="reports-footer-header-template">
|
||||
<%= javascript_include_tag 'reports/template_helpers', nonce: true %>
|
||||
<%= yield %>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -122,6 +122,7 @@ Rails.application.config.assets.precompile += %w(results/result_texts/new.js)
|
|||
Rails.application.config.assets.precompile += %w(results/result_texts/edit.js)
|
||||
Rails.application.config.assets.precompile += %w(shared/file_preview.js)
|
||||
Rails.application.config.assets.precompile += %w(users/shared/linkedin_sign_in_links.js)
|
||||
Rails.application.config.assets.precompile += %w(reports/template_helpers.js)
|
||||
|
||||
# Libraries needed for Handsontable formulas
|
||||
Rails.application.config.assets.precompile += %w(jquery.js)
|
||||
|
|
|
@ -22,6 +22,10 @@ common: &default_settings
|
|||
# Logging level for log/newrelic_agent.log
|
||||
log_level: info
|
||||
|
||||
# Disable automatic browser agent
|
||||
browser_monitoring:
|
||||
auto_instrument: false
|
||||
|
||||
|
||||
# Environment-specific settings are in this section.
|
||||
# RAILS_ENV or RACK_ENV (as appropriate) is used to determine the environment.
|
||||
|
|
Loading…
Reference in a new issue