summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuriy Andamasov <yuriy@vyos.io>2026-04-17 16:05:23 +0300
committerYuriy Andamasov <yuriy@vyos.io>2026-04-17 16:05:23 +0300
commit3f4cea474e488dfbe892e833deace49b4c8be513 (patch)
tree018a7669a1ce07b6afcee50ff1181d489c9d4f44
parent481e89ef002dd440943ce0d36a88fc6a674b9161 (diff)
downloadcommunity.vyos.net-3f4cea474e488dfbe892e833deace49b4c8be513.tar.gz
community.vyos.net-3f4cea474e488dfbe892e833deace49b4c8be513.zip
Gate preconnect hints on profile=live via soupault widget
Task 5 inserted the preconnect tags directly into templates/main.html, which caused them to ship on every profile — defeating the staging privacy posture (staging visitors' IPs would leak to Cookiebot and metrics.vyos.io during TLS handshake). Moves them to a new insert-preconnect-hints widget with profile = "live", matching the pattern used for the two GTM widgets and Step 5.2's original --profile live verification intent. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
-rw-r--r--soupault.toml10
-rw-r--r--templates/main.html10
2 files changed, 10 insertions, 10 deletions
diff --git a/soupault.toml b/soupault.toml
index 801bb86..7c41812 100644
--- a/soupault.toml
+++ b/soupault.toml
@@ -71,6 +71,16 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
action = "prepend_child"
profile = "live"
+[widgets.insert-preconnect-hints]
+ widget = "insert_html"
+ html = """
+<link rel="preconnect" href="https://metrics.vyos.io" crossorigin />
+<link rel="preconnect" href="https://consent.cookiebot.com" crossorigin />
+"""
+ selector = "head"
+ action = "append_child"
+ profile = "live"
+
# Inserts a scary warning banner in preview versions
[widgets.insert-staging-warning]
widget = "include"
diff --git a/templates/main.html b/templates/main.html
index b5ae50c..03659c2 100644
--- a/templates/main.html
+++ b/templates/main.html
@@ -45,16 +45,6 @@
rel="stylesheet"
href="/main.css"
/>
- <link
- rel="preconnect"
- href="https://metrics.vyos.io"
- crossorigin
- />
- <link
- rel="preconnect"
- href="https://consent.cookiebot.com"
- crossorigin
- />
</head>
<body>
<header id="header">