chore: decrease preview link validity to 5 minutes

Reduces the preview link time-to-live from 24 hours to 5 minutes for improved security. Updates related user-facing message in the dashboard editor to reflect this change.
This commit is contained in:
ccbikai 2025-03-12 20:10:32 +08:00
parent 31731c5bed
commit e909922a5a
2 changed files with 2 additions and 2 deletions

View file

@ -8,7 +8,7 @@ export default defineAppConfig({
blog: 'https://sink.cool/blog', blog: 'https://sink.cool/blog',
description: 'A Simple / Speedy / Secure Link Shortener with Analytics, 100% run on Cloudflare.', description: 'A Simple / Speedy / Secure Link Shortener with Analytics, 100% run on Cloudflare.',
image: 'https://sink.cool/banner.png', image: 'https://sink.cool/banner.png',
previewTTL: 24 * 3600, // 24h previewTTL: 300, // 5 minutes
slugRegex: /^[a-z0-9]+(?:-[a-z0-9]+)*$/i, slugRegex: /^[a-z0-9]+(?:-[a-z0-9]+)*$/i,
reserveSlug: [ reserveSlug: [
'dashboard', 'dashboard',

View file

@ -147,7 +147,7 @@ const { previewMode } = useRuntimeConfig().public
v-if="previewMode" v-if="previewMode"
class="text-sm text-muted-foreground" class="text-sm text-muted-foreground"
> >
The preview mode link is valid for up to 24 hours. The preview mode link is valid for up to 5 minutes.
</p> </p>
<AutoForm <AutoForm
class="px-2 space-y-2 overflow-y-auto" class="px-2 space-y-2 overflow-y-auto"