Skip to content

Commit

Permalink
Improved style nonce logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Jun 30, 2024
1 parent 6b88387 commit 38a253f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/views/layouts/field_test/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<meta charset="utf-8" />

<%= content_tag :style, nonce: content_security_policy_nonce do %>
<%= content_tag :style, nonce: request.content_security_policy_nonce_directives.include?("style-src") ? content_security_policy_nonce : nil do %>
body {
margin: 0;
padding: 20px;
Expand Down

0 comments on commit 38a253f

Please sign in to comment.