From 1482c6aaf04b4a30e8fc173a5cf78259532b7dbe Mon Sep 17 00:00:00 2001 From: riricdev Date: Mon, 7 Sep 2026 15:16:20 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20easter=20egg=20th=C3=A9i=C3=A8re=20418?= =?UTF-8?q?=20+=20Konami=20obfusqu=C3=A9=20via=20global.js=20centralis?= =?UTF-8?q?=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - /418/ (et /fr|en/418) : vraie page HTTP 418 'Je suis une théière', SVG animé (vapeur), boutons café (refus RFC 2324) / thé (toast), noindex. - Nouveau public/js/global.js chargé sur toutes les pages (statiques, dynamiques articles/blog, page d'erreur) qui : * écoute le code Konami ↑↑↓↓←→←→BA → redirige vers /418/ ; * charge ses clés par codes de caractères (aucune chaîne révélatrice en clair : ni 'ArrowUp', ni '/418/', ni 'b/a' dans la source) ; * sert de dispatcher centralisé : injecte par page (components/discord/ zfprobe) via ou règles de chemin, sans doublon. - easter.js supprimé au profit de global.js unique sur 22 pages statiques. --- public/blog/en/index.html | 1 + public/blog/index.html | 1 + public/en/index.html | 1 + public/equipe/en/index.html | 1 + public/equipe/index.html | 1 + public/error.html | 1 + public/fingerprint-test/en/index.html | 1 + public/fingerprint-test/index.html | 1 + public/index.html | 1 + public/js/global.js | 81 +++++++++++++++ public/privacy-policy/en/index.html | 1 + public/privacy-policy/index.html | 1 + public/projets/en/index.html | 1 + public/projets/index.html | 1 + public/tos/en/index.html | 1 + public/tos/index.html | 1 + public/zenyth/index.html | 1 + public/zmap/archives/en/index.html | 1 + public/zmap/archives/index.html | 1 + public/zmap/en/index.html | 1 + public/zmap/index.html | 1 + public/zmap/road-speeds/en/index.html | 1 + public/zmap/vitesses-par-route/index.html | 1 + src/server.ts | 114 ++++++++++++++++++++++ 24 files changed, 217 insertions(+) create mode 100644 public/js/global.js diff --git a/public/blog/en/index.html b/public/blog/en/index.html index 110046b..de36947 100644 --- a/public/blog/en/index.html +++ b/public/blog/en/index.html @@ -47,6 +47,7 @@ + diff --git a/public/blog/index.html b/public/blog/index.html index 8868c74..48754ff 100644 --- a/public/blog/index.html +++ b/public/blog/index.html @@ -47,6 +47,7 @@ + diff --git a/public/en/index.html b/public/en/index.html index c2e7eb5..53c0a4f 100644 --- a/public/en/index.html +++ b/public/en/index.html @@ -121,6 +121,7 @@ + diff --git a/public/equipe/en/index.html b/public/equipe/en/index.html index 2b9aaad..46e134a 100644 --- a/public/equipe/en/index.html +++ b/public/equipe/en/index.html @@ -57,6 +57,7 @@ + diff --git a/public/equipe/index.html b/public/equipe/index.html index 42a1f47..82c307e 100644 --- a/public/equipe/index.html +++ b/public/equipe/index.html @@ -57,6 +57,7 @@ + diff --git a/public/error.html b/public/error.html index 2dfacc9..5fa7315 100644 --- a/public/error.html +++ b/public/error.html @@ -10,6 +10,7 @@ + + + + ${siteHeader(lang)} + +
+
+

418

+

${sub}

+ +

${text}

+
+ + +
+

\u2191 \u2191 \u2193 \u2193 \u2190 \u2192 \u2190 \u2192 B A

+

${note}

+
+
+ +
+ + ${siteFooter(lang)} + + + +` +} + function errorPage(status: number, req?: Request): Response { const urlPath = req ? new URL(req.url).pathname : "/" const lang: "fr" | "en" = /^\/en(\/|$)/.test(urlPath) ? "en" : "fr" @@ -677,6 +779,7 @@ ${ldJson} + @@ -737,6 +840,7 @@ function newsIndex(lang: "fr" | "en"): string { + @@ -1316,6 +1420,16 @@ server = serve({ return new Response(body, { headers: { "Content-Type": "application/json; charset=utf-8", "Cache-Control": "no-cache" } }) } + // Œuf de Pâques : la théière (RFC 2324). Accessible par la séquence Konami. + const teaMatch = pathname.match(/^\/(?:418|(fr|en)\/418)(?:\/)?$/) + if (teaMatch) { + const lang: "fr" | "en" = teaMatch[1] === "en" ? "en" : detectLang(req) + return new Response(teapotPage(lang), { + status: 418, + headers: { "Content-Type": "text/html; charset=utf-8", "Cache-Control": "no-store" }, + }) + } + // Pages de documentation globale des API const docsMatch = pathname.match(/^\/docs\/([a-z0-9-]+)\/?$/) if (docsMatch) {