<p></p>
<p><b>@grekko</b> commented on this pull request.</p>
<hr>
<p>In <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4562#discussion_r1533660273">app/views/layouts/_head.html.erb</a>:</p>
<pre style='color:#555'>> @@ -2,6 +2,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<%= javascript_include_tag "es6" unless browser.es6? %>
+ <%= javascript_include_tag "turbo", :type => "module" %>
</pre>
<blockquote>
<p dir="auto">which sets the CSP nonce for turbo using secure_headers instead.</p>
</blockquote>
<p dir="auto">ok. I had to read up a bit on the <code class="notranslate">secure_headers</code>-gem CSP implementation and CSP generally.</p>
<p dir="auto">I understand the the <code class="notranslate">csp_meta_tag</code> currently does nothing since its provided by Rails, which builds on Rails CSP configuration (currently nothing is configured in <code class="notranslate">config/initializers/content_security_policy.rb</code>).</p>
<p dir="auto"><code class="notranslate">content_security_policy_style_nonce</code> is provided by <code class="notranslate">secure_headers</code> (here <a href="https://github.com/github/secure_headers/blob/7a23cb6b350b024a786e163e81c902552b9c484f/lib/secure_headers/view_helper.rb#L83-L85">https://github.com/github/secure_headers/blob/7a23cb6b350b024a786e163e81c902552b9c484f/lib/secure_headers/view_helper.rb#L83-L85</a>) and therefore the correct way to safelist certain inline styles.</p>
<p dir="auto">I'll adjust the PR to reflect this. Thanks <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/tomhughes/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/tomhughes">@tomhughes</a> for pointing this out and please correct anything or add anything you think one should know.</p>
<p dir="auto">As I've mentioned my understanding of CSP is still limited and I have not practical experiences yet.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/4562#discussion_r1533660273">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLL6FWYUQYUVJCTHP6TYZK4RLAVCNFSM6AAAAABEIVPY5KVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSNJRG44TSNZZG4">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLJD2JVSHRGHJOPFU63YZK4RLA5CNFSM6AAAAABEIVPY5KWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTTUKYM7K.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/4562/review/1951799797</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/4562#discussion_r1533660273",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/4562#discussion_r1533660273",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>