diff --git a/src/frontend/src/views/links/Links.vue b/src/frontend/src/views/links/Links.vue index 5918d25..7da1516 100644 --- a/src/frontend/src/views/links/Links.vue +++ b/src/frontend/src/views/links/Links.vue @@ -463,7 +463,8 @@ const deleteLink = async () => { }; const getShortUrl = (link) => { - return `localhost:42001/${link.slug}`; + const origin = new URL(import.meta.env.VITE_API_URL).origin; + return `${origin}/${link.slug}`; }; const truncateUrl = (url) => { @@ -475,7 +476,7 @@ const truncateUrl = (url) => { const copyToClipboard = async (text) => { try { - await navigator.clipboard.writeText(`http://${text}`); + await navigator.clipboard.writeText(text); } catch (err) { console.error('Failed to copy:', err); }