Skip to content

Commit 724536c

Browse files
authored
Update inline javascript tags to allow for csp nonces (#201)
1 parent 556c896 commit 724536c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
<script>
1+
<%= javascript_tag nonce: true do %>
22
var rootPath = '<%= Avo.configuration.root_path %>';
33
var timezone = '<%= Avo.configuration.timezone %>';
44
var locale = '<%= Avo.configuration.locale %>';
55
var defaultViewType = '<%= Avo.configuration.default_view_type %>';
66
var license = <%= Avo::App.license.properties.to_json.html_safe %>;
77
var avoResources = <%= Avo::App.get_available_resources(current_user).as_json.html_safe %>;
8-
</script>
8+
<% end %>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
<script>
1+
<%= javascript_tag nonce: true do %>
22
I18n.defaultLocale = 'en';
33
I18n.locale = "<%= Avo.configuration.language_code %>";
4-
</script>
4+
<% end %>
55
<%= javascript_include_tag 'translations', skip_pipeline: true %>

0 commit comments

Comments
 (0)