Skip to content

Commit 4e1c8d1

Browse files
authored
Merge pull request #222 from autonomys/fix-encoding-handling
fix: encoding handling
2 parents 0885944 + 44e0f8f commit 4e1c8d1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

backend/src/services/download/express.ts

+1-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ export const handleDownloadResponseHeaders = (
77
metadata: OffchainMetadata,
88
) => {
99
const safeName = encodeURIComponent(metadata.name || 'download')
10-
const isExpectedDocument =
11-
req.headers['sec-fetch-dest'] === 'document' ||
12-
req.headers['sec-fetch-dest'] === 'iframe'
10+
const isExpectedDocument = req.headers['sec-fetch-site'] === 'none'
1311

1412
if (metadata.type === 'file') {
1513
res.set('Content-Type', metadata.mimeType || 'application/octet-stream')

0 commit comments

Comments
 (0)