From 8da782339e6c669361be319f1dc12dd32bea68b9 Mon Sep 17 00:00:00 2001 From: chahinebrini Date: Tue, 9 Jun 2026 05:03:14 +0200 Subject: [PATCH] refactor(marketing): /preview-Zugriffsschutz via nginx Basic-Auth statt Client-Gate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Client-seitiges Passwort-Gate entfernt: schrieb das Passwort ins offen erreichbare JS-Bundle (= Leak, identisch zum nginx-PW) und verursachte doppelte Passworteingabe. Schutz läuft jetzt serverseitig via nginx auf /preview (Seite + Bilder). Ein Passwort, kein Leak. Co-Authored-By: Claude Opus 4.8 --- apps/marketing/app/pages/preview.vue | 49 +++------------------------- 1 file changed, 5 insertions(+), 44 deletions(-) diff --git a/apps/marketing/app/pages/preview.vue b/apps/marketing/app/pages/preview.vue index 6adbf74..1b63d6c 100644 --- a/apps/marketing/app/pages/preview.vue +++ b/apps/marketing/app/pages/preview.vue @@ -13,24 +13,9 @@ useHead({ meta: [{ name: "robots", content: "noindex, nofollow" }], }) -// ─── Passwort-Gate ──────────────────────────────────────────────────── -const PREVIEW_PASSWORD = "rebreak-fags" // TODO vor dem Teilen ändern -const unlockedCookie = useCookie("rebreak_preview", { - maxAge: 60 * 60 * 24 * 30, - sameSite: "lax", -}) -const unlocked = ref(unlockedCookie.value === "1") -const passwordInput = ref("") -const wrong = ref(false) -function tryUnlock() { - if (passwordInput.value.trim() === PREVIEW_PASSWORD) { - unlockedCookie.value = "1" - unlocked.value = true - wrong.value = false - } else { - wrong.value = true - } -} +// Zugriffsschutz läuft serverseitig via nginx Basic-Auth auf /preview +// (Seite + Bilder). Kein Client-Gate mehr (würde das Passwort ins offene +// JS-Bundle schreiben + doppelte Passworteingabe verursachen). // ─── Reduced-Motion-respektierende Animationen ──────────────────────── const reduce = usePreferredReducedMotion() @@ -69,32 +54,8 @@ const onboardingSteps = [