diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-07-18 16:30:31 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-07-18 16:30:31 +0200 |
| commit | 0c6783816e0a7a8acad922296d3eb8cc454fb981 (patch) | |
| tree | 54c59e86afa188de6429ff0e1f07d1b6e4f36350 /app/views/layouts/application.html.erb | |
| parent | 6b6e50909cc77de1797e88be5445c5b643b008a9 (diff) | |
Emit a report-only Content-Security-Policy with nonced inline scripts
- dark-mode restore now travels nonced, the admin constants likewise
- AUTH_TOKEN deleted in favour of the csrf meta tag
- new report collector at /csp_reports
Diffstat (limited to 'app/views/layouts/application.html.erb')
| -rw-r--r-- | app/views/layouts/application.html.erb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index d7681aff..ca867ab8 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb | |||
| @@ -18,12 +18,12 @@ | |||
| 18 | <%= auto_discovery_link_tag(:atom, '/rss/updates.xml', title: "ATOM") %> | 18 | <%= auto_discovery_link_tag(:atom, '/rss/updates.xml', title: "ATOM") %> |
| 19 | <%= auto_discovery_link_tag(:rss, '/rss/updates.rdf', title: "RSS") %> | 19 | <%= auto_discovery_link_tag(:rss, '/rss/updates.rdf', title: "RSS") %> |
| 20 | 20 | ||
| 21 | <script> | 21 | <%= javascript_tag nonce: true do %> |
| 22 | (function() { document.addEventListener("DOMContentLoaded", function() { | 22 | document.addEventListener("DOMContentLoaded", function() { |
| 23 | if (localStorage.getItem('override-prefers-color-scheme', false)) | 23 | if (localStorage.getItem('override-prefers-color-scheme')) |
| 24 | document.getElementById("light-mode").checked = true; | 24 | document.getElementById("light-mode").checked = true; |
| 25 | }); })(); | 25 | }); |
| 26 | </script> | 26 | <% end %> |
| 27 | 27 | ||
| 28 | </head> | 28 | </head> |
| 29 | 29 | ||
