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

Commit 5f6267c

Browse files
author
Tomasz Kostuch
authored
Merge pull request #453 from gibkigonzo/bugfix/434
check if headers has been already sent in image middleware
2 parents 013d79b + a701ab8 commit 5f6267c

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3030
- Improve `_outputFormatter` on cache catalog-response to prevent exception - @cewald (#432)
3131
- use ts for compiling additional scripts - @gibkigonzo (#437)
3232
- Bugfix for wrong JSON scheme url's and hostname resolution for `magento1` platform - @cewald (#443)
33+
- check if headers has been already sent in image middleware - @gibkigonzo (#434)
3334

3435
## [1.11.1] - 2020.03.17
3536

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)