From a3ebee642d28093c176eb0e1c4db2d7636d72999 Mon Sep 17 00:00:00 2001 From: Lena Date: Mon, 3 Aug 2026 13:04:38 -0700 Subject: [PATCH 1/4] update website to read stats from new distribution --- static/js/stats.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/static/js/stats.js b/static/js/stats.js index 73096952c..1ca147bfc 100644 --- a/static/js/stats.js +++ b/static/js/stats.js @@ -325,7 +325,14 @@ function doPlot() { path = "/js/"; // in dev, will use old data. } - fetch(path+"cert-timeline.tsv") + var statsPath; + if ( location.hostname === "letsencrypt.org" ) { + path = "https://dxxxx.cloudfront.net/"; + } else { + path = "/js/"; // in dev, will use old data. + } + + fetch(statsPath+"cert-daily-stats.tsv") .then(response => { return response.text(); }).then(tsvListener); From a42ffd994bf7114b206d34a9605bf315636d6646 Mon Sep 17 00:00:00 2001 From: Lena Date: Fri, 14 Aug 2026 07:25:41 -0700 Subject: [PATCH 2/4] fill in distribution url for new stats bucket --- static/js/stats.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/stats.js b/static/js/stats.js index 1ca147bfc..09ec8b12a 100644 --- a/static/js/stats.js +++ b/static/js/stats.js @@ -327,7 +327,7 @@ function doPlot() { var statsPath; if ( location.hostname === "letsencrypt.org" ) { - path = "https://dxxxx.cloudfront.net/"; + path = "https://d1dfn7jg27m4cf.cloudfront.net/"; } else { path = "/js/"; // in dev, will use old data. } From a283a71408a0818469bc2bfc7a7bb622f4bb28b0 Mon Sep 17 00:00:00 2001 From: Lena Date: Fri, 14 Aug 2026 08:26:50 -0700 Subject: [PATCH 3/4] fix stats should be statspath bug; rename static/js cert tsv file --- _maintenance_update_graph_data.sh.example | 4 ++-- static/js/{cert-timeline.tsv => cert-daily-stats.tsv} | 1 + static/js/stats.js | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) rename static/js/{cert-timeline.tsv => cert-daily-stats.tsv} (99%) diff --git a/_maintenance_update_graph_data.sh.example b/_maintenance_update_graph_data.sh.example index 11609d45c..c425cd410 100644 --- a/_maintenance_update_graph_data.sh.example +++ b/_maintenance_update_graph_data.sh.example @@ -2,9 +2,9 @@ set -eu -outFile="$(dirname "$0")/js/cert-timeline.tsv" +outFile="$(dirname "$0")/js/cert-daily-stats.tsv" # Download to a temp file, then move over-top the original, so that the update is # atomic from the perspective of the webserver -curl --silent https://ct.tacticalsecret.com/cert-timeline.tsv > "${outFile}.bak" +curl --silent https://ct.tacticalsecret.com/cert-daily-stats.tsv > "${outFile}.bak" mv "${outFile}.bak" "${outFile}" diff --git a/static/js/cert-timeline.tsv b/static/js/cert-daily-stats.tsv similarity index 99% rename from static/js/cert-timeline.tsv rename to static/js/cert-daily-stats.tsv index d6c782c3f..03ea9b24c 100644 --- a/static/js/cert-timeline.tsv +++ b/static/js/cert-daily-stats.tsv @@ -1,3 +1,4 @@ +date certs_issued certs_active fqdns_active reg_domains_active 2015-10-08 2 2 1 1 2015-10-09 4 6 5 2 2015-10-10 1 7 6 2 diff --git a/static/js/stats.js b/static/js/stats.js index 09ec8b12a..7d8c18ee2 100644 --- a/static/js/stats.js +++ b/static/js/stats.js @@ -327,9 +327,9 @@ function doPlot() { var statsPath; if ( location.hostname === "letsencrypt.org" ) { - path = "https://d1dfn7jg27m4cf.cloudfront.net/"; + statsPath = "https://d1dfn7jg27m4cf.cloudfront.net/"; } else { - path = "/js/"; // in dev, will use old data. + statsPath = "/js/"; // in dev, will use old data. } fetch(statsPath+"cert-daily-stats.tsv") From b7c3bec6defd63160fbf1bd079220a1fe93dd8ce Mon Sep 17 00:00:00 2001 From: Lena Date: Fri, 14 Aug 2026 08:39:15 -0700 Subject: [PATCH 4/4] update netlify previews to use cloudfront data instead of dev data --- config/_default/server.toml | 3 ++- netlify.toml | 3 ++- static/js/stats.js | 12 ++++++------ 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/config/_default/server.toml b/config/_default/server.toml index a7107ba97..1f7a6d0af 100644 --- a/config/_default/server.toml +++ b/config/_default/server.toml @@ -18,7 +18,7 @@ Permissions-Policy = """ fullscreen=(self), interest-cohort=() """ -# "connect-src https://d4twhgtvn0ff5.cloudfront.net/" for stats graphs +# "connect-src https://d4twhgtvn0ff5.cloudfront.net/ and https://d1dfn7jg27m4cf.cloudfront.net/" for stats graphs # "img-src data: blob:" is for Plotly download feature # "script-src unsafe-eval unsafe-inline data:": For Google Analytics # "form-action" is NOT set, so it allows everything (it doesn't default to default-src). If restricted, It must allow at least www.paypal.com and its redirects @@ -79,6 +79,7 @@ Content-Security-Policy = """ ; connect-src 'self' https://d4twhgtvn0ff5.cloudfront.net/ + https://d1dfn7jg27m4cf.cloudfront.net/ https://donorbox.org https://doublethedonation.com https://letsencrypt-merch.myshopify.com diff --git a/netlify.toml b/netlify.toml index a7a71164b..45a4e6fe0 100644 --- a/netlify.toml +++ b/netlify.toml @@ -28,7 +28,7 @@ Permissions-Policy = """ fullscreen=(self), interest-cohort=() """ -# "connect-src https://d4twhgtvn0ff5.cloudfront.net/" for stats graphs +# "connect-src https://d4twhgtvn0ff5.cloudfront.net/ and https://d1dfn7jg27m4cf.cloudfront.net/" for stats graphs # "img-src data: blob:" is for Plotly download feature # "script-src unsafe-eval unsafe-inline data:": For Google Analytics # "form-action" is NOT set, so it allows everything (it doesn't default to default-src). If restricted, It must allow at least www.paypal.com and its redirects @@ -89,6 +89,7 @@ Content-Security-Policy = """ ; connect-src 'self' https://d4twhgtvn0ff5.cloudfront.net/ + https://d1dfn7jg27m4cf.cloudfront.net/ https://donorbox.org https://doublethedonation.com https://letsencrypt-merch.myshopify.com diff --git a/static/js/stats.js b/static/js/stats.js index 7d8c18ee2..e8d4993bd 100644 --- a/static/js/stats.js +++ b/static/js/stats.js @@ -319,17 +319,17 @@ function doPlot() { } var path; - if ( location.hostname === "letsencrypt.org" ) { - path = "https://d4twhgtvn0ff5.cloudfront.net/"; - } else { + if ( location.hostname === "localhost" ) { path = "/js/"; // in dev, will use old data. + } else { + path = "https://d4twhgtvn0ff5.cloudfront.net/"; } var statsPath; - if ( location.hostname === "letsencrypt.org" ) { - statsPath = "https://d1dfn7jg27m4cf.cloudfront.net/"; - } else { + if ( location.hostname === "localhost" ) { statsPath = "/js/"; // in dev, will use old data. + } else { + statsPath = "https://d1dfn7jg27m4cf.cloudfront.net/"; } fetch(statsPath+"cert-daily-stats.tsv")