Skip to content

Commit

Permalink
Add nonce to javascipt tag to support strict content security policies (
Browse files Browse the repository at this point in the history
  • Loading branch information
murraybo authored Sep 4, 2023
1 parent cfa776b commit 40ec1d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/hotwire/livereload/_head_action_cable.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<% if Rails.env.development? %>
<%= javascript_include_tag('hotwire-livereload', defer: true) %>
<%= javascript_include_tag('hotwire-livereload', defer: true, nonce: true) %>
<% end %>
2 changes: 1 addition & 1 deletion app/views/hotwire/livereload/_head_turbo_stream.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% if Rails.env.development? %>
<%= turbo_stream_from('hotwire-livereload') %>
<%= javascript_include_tag('hotwire-livereload-turbo-stream', defer: true) %>
<%= javascript_include_tag('hotwire-livereload-turbo-stream', defer: true, nonce: true) %>
<% end %>

0 comments on commit 40ec1d4

Please sign in to comment.