Token-Cookie pfadunabhängig speichern
This commit is contained in:
@@ -460,7 +460,7 @@ async function downloadAttachment(attachment: NonNullable<EmailMessage["attachme
|
||||
const apiBase = String(runtimeConfig.public.apiBase || "").replace(/\/$/, "")
|
||||
const path = `/api/email/attachments/${attachment.id}/download`
|
||||
const downloadUrl = new URL(apiBase ? `${apiBase}${path}` : path, window.location.origin)
|
||||
const token = useCookie("token").value
|
||||
const token = useCookie<string | null>("token", { path: "/" }).value
|
||||
|
||||
if (token) {
|
||||
downloadUrl.searchParams.set("downloadToken", token)
|
||||
|
||||
Reference in New Issue
Block a user