]> git.openstreetmap.org Git - dns.git/blobdiff - src/opengeodata.js
Use SPF and CAA builder. Normalise TTL
[dns.git] / src / opengeodata.js
index 6dfc203874d1a5be4858f71187d4555e4b90c1f1..fe354674949e5111ee10598462e6c88c97b57d79 100644 (file)
@@ -2,9 +2,29 @@ D(DOMAIN, REGISTRAR, DnsProvider(PROVIDER),
 
   // Publish CAA records indicating that only letsencrypt should issue certificates
 
-  CAA("@", "issue", "letsencrypt.org", CF_TTL_ANY),
-  CAA("@", "issuewild", "letsencrypt.org", CF_TTL_ANY),
-  CAA("@", "iodef", "mailto:hostmaster@openstreetmap.org"),
+  CAA_BUILDER({
+    label: "@",
+    ttl: "1h",
+    iodef: "mailto:hostmaster@openstreetmap.org",
+    issue: [
+      "letsencrypt.org",
+    ],
+    issuewild: [
+      "letsencrypt.org",
+    ],
+  }),
+
+  // Delegate SPF policy to the main domain
+
+  SPF_BUILDER({
+    label: "@",
+    ttl: "1h",
+    parts: [
+      "v=spf1",
+      "include:openstreetmap.org",      // main openstreetmap.org spf record
+      "-all"
+    ]
+  }),
 
   // Main web server and it's aliases
 
@@ -12,4 +32,4 @@ D(DOMAIN, REGISTRAR, DnsProvider(PROVIDER),
   A("old", RIDLEY_IPV4, TTL("10m")),
   A("www", RIDLEY_IPV4, TTL("10m"))
 
-);
+);
\ No newline at end of file