Add speculation rules for pre-fetching and rendering

This commit is contained in:
2024-06-16 10:14:57 +10:00
parent be329447ab
commit 98e289744a
4 changed files with 37 additions and 1 deletions

View File

@@ -6,6 +6,7 @@ module Adamantium
class App < Hanami::App
config.actions.content_security_policy[:script_src] += " 'unsafe-eval' https://gist.github.com"
config.actions.content_security_policy[:script_src] += " *.dnitza.com"
config.actions.content_security_policy[:script_src] += " 'inline-speculation-rules' hash-sha256-GSFnYlZ2/GzNMMMe8WYjAF1Xb+IxEi2PZpSLZO+va38="
config.actions.content_security_policy[:script_src] += " https://api.mapbox.com/mapbox-gl-js/v2.9.1/mapbox-gl.js"
config.actions.content_security_policy[:media_src] += " https://dnitza.com"
config.actions.content_security_policy[:script_src] += " https://unpkg.com/htmx.org@1.9.2/dist/htmx.min.js "