fix: Links to attachments do not work in emailed notifications (#5935)

This commit is contained in:
Tom Moor
2023-10-04 21:25:07 -04:00
committed by GitHub
parent e1c90d3938
commit 1359f44814
4 changed files with 47 additions and 9 deletions

View File

@@ -29,6 +29,7 @@ function isAttachment(token: Token) {
// external (public share are pre-signed and this is a reasonable way of detecting them)
href?.startsWith("/api/attachments.redirect") ||
href?.startsWith("/api/files.get") ||
href?.startsWith(`${env.URL}/api/files.get`) ||
((href?.startsWith(env.AWS_S3_UPLOAD_BUCKET_URL) ||
href?.startsWith(env.AWS_S3_ACCELERATE_URL)) &&
href?.includes("X-Amz-Signature"))