Ticket > Details > Projekte: geheimer Vorschau-Link (erstellen, kopieren, oeffnen, neu, abschalten)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-26 17:59:23 +00:00
1 parent 3c44c42681
commit 1a6e533a9a
6 files changed
+132

No files matched your search

+10
View File
@@ -0,0 +1,10 @@
// Geheimer Vorschau-Link (2026-10-26): wer ihn kennt, sieht die Preview ohne Login.
// Das Portal löst ihn ein (Cookie + Weiterleitung), siehe Kundenportal server/services/vorschauLink.js.
const PORTAL = 'https://project.webklar.com'
export function vorschauLinkUrl(project, base = PORTAL) {
const subdomain = String(project?.subdomain || '').trim().toLowerCase()
const token = String(project?.shareToken || '').trim()
if (!subdomain || !token) return ''
return `${String(base).replace(/\/$/, '')}/vorschau/${encodeURIComponent(subdomain)}/${encodeURIComponent(token)}`
}