This commit is contained in:
Brendan Allan 2025-12-18 01:53:20 +08:00
parent 0d6bc0a0ad
commit e6bf7da08d
No known key found for this signature in database
GPG key ID: 41E835AEA046A32E

View file

@ -31,10 +31,7 @@ export async function GET({ params: { platform } }: APIEvent) {
const downloadName = downloadNames[platform]
const headers = new Headers(resp.headers)
if (downloadName) {
// Remove hardcoded file name
headers.set("content-disposition", `attachment; filename="${downloadName}"`)
}
if (downloadName) headers.set("content-disposition", `attachment; filename="${downloadName}"`)
return new Response(resp.body, { ...resp, headers })
}