Skip to content

Commit ff7b79f

Browse files
committed
Improved style nonce logic
1 parent 04ed26c commit ff7b79f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/views/clockwork_web/home/index.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<meta charset="utf-8" />
77

8-
<%= content_tag :style, nonce: content_security_policy_nonce do %>
8+
<%= content_tag :style, nonce: request.content_security_policy_nonce_directives&.include?("style-src") ? content_security_policy_nonce : nil do %>
99
body {
1010
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
1111
margin: 0;

0 commit comments

Comments
 (0)