Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 5b19374

Browse files
committed
Fix cache contentType don't respect the headers
1 parent 9348d76 commit 5b19374

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/cache.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export async function cache(url: string, options?: { forceRefresh?: boolean, ret
3232
const { headers = {} } = JSON.parse(meta)
3333
return {
3434
content,
35-
contentType: headers['Content-Type'] || null
35+
contentType: headers['content-type'] || null
3636
}
3737
} catch (e) { }
3838
}
@@ -66,7 +66,7 @@ export async function cache(url: string, options?: { forceRefresh?: boolean, ret
6666
}
6767
return {
6868
content,
69-
contentType: resp.headers.get('Content-Type')
69+
contentType: resp.headers.get('content-type')
7070
}
7171
} catch (e) {
7272
err = e

0 commit comments

Comments
 (0)