From: Grant Slater Date: Sun, 29 Jan 2023 16:44:04 +0000 (+0000) Subject: Add temp workaround for Github Pages welcome hijack X-Git-Url: https://git.openstreetmap.org./dns.git/commitdiff_plain/996105ef5d12d65f3afd10022934284bb3e81bdb?ds=sidebyside Add temp workaround for Github Pages welcome hijack --- diff --git a/src/openstreetmap.js b/src/openstreetmap.js index b64b998..24ce9c8 100644 --- a/src/openstreetmap.js +++ b/src/openstreetmap.js @@ -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 @@ -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("welcome", "osmfoundation.github.io."), + WELCOME_DOMAIN, // Dynamic DNS records