]> git.openstreetmap.org Git - dns.git/commitdiff
Add temp workaround for Github Pages welcome hijack
authorGrant Slater <github@firefishy.com>
Sun, 29 Jan 2023 16:44:04 +0000 (16:44 +0000)
committerGrant Slater <github@firefishy.com>
Sun, 29 Jan 2023 16:44:04 +0000 (16:44 +0000)
src/openstreetmap.js

index b64b998a5aca045d45451925e9001ce6733db058..24ce9c848d84f040ecff64c213cad19851f8bb54 100644 (file)
@@ -1,3 +1,12 @@
+if ( DOMAIN == "openstreetmap.org" ) {
+  // Custom Domain for https://github.com/osmfoundation/welcome-mat/
+  var WELCOME_DOMAIN = CNAME("welcome", "osmfoundation.github.io.")
+} else {
+  // Github Pages only allows 1 domain name per site.
+  // Avoid Google Pages domain hijack
+  var WELCOME_DOMAIN = CNAME("welcome", "openstreetmmap.")
+}
+
 D(DOMAIN, REGISTRAR, DnsProvider(PROVIDER),
 
   // Publish CAA records indicating that only letsencrypt and globalsign (Fastly) should issue certificates
 D(DOMAIN, REGISTRAR, DnsProvider(PROVIDER),
 
   // Publish CAA records indicating that only letsencrypt and globalsign (Fastly) should issue certificates
@@ -630,8 +639,7 @@ D(DOMAIN, REGISTRAR, DnsProvider(PROVIDER),
   CNAME("uptime", "uptimessl-new.statuscake.com."),
 
   // Custom Domain for https://github.com/osmfoundation/welcome-mat/
   CNAME("uptime", "uptimessl-new.statuscake.com."),
 
   // Custom Domain for https://github.com/osmfoundation/welcome-mat/
-
-  CNAME("welcome", "osmfoundation.github.io."),
+  WELCOME_DOMAIN,
 
   // Dynamic DNS records
 
 
   // Dynamic DNS records