Skip to content
This repository was archived by the owner on May 28, 2023. It is now read-only.

Commit 97f8751

Browse files
author
tkostuch
committed
check if header has been send
1 parent a344046 commit 97f8751

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/api/img.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ export default ({ config, db }) =>
4141
imageBuffer = imageAction.imageBuffer
4242
}
4343

44+
if (res.headersSent) {
45+
return
46+
}
47+
4448
return res
4549
.type(imageAction.mimeType)
4650
.set({ 'Cache-Control': `max-age=${imageAction.maxAgeForResponse}` })

0 commit comments

Comments
 (0)