]> git.openstreetmap.org Git - dns.git/blobdiff - src/switch2osm.js
Use SPF and CAA builder. Normalise TTL
[dns.git] / src / switch2osm.js
index 38422fa9551b4cf38eb40f8bc2f112e8d2129479..70e2775efc77ee7a674e5a1c433b5f232235b22f 100644 (file)
@@ -2,13 +2,33 @@ 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
 
-  A("@", "193.60.236.19", TTL("10m")),
-  A("www", "193.60.236.19", TTL("10m"))
+  A("@", RIDLEY_IPV4, TTL("10m")),
+  A("www", RIDLEY_IPV4, TTL("10m"))
 
 );