(req, res, next)
| 36 | } |
| 37 | |
| 38 | export default function favicons(req, res, next) { |
| 39 | if (!MAP[req.path]) return next() |
| 40 | |
| 41 | // This makes sure the CDN caching survives each production deployment. |
| 42 | setFastlySurrogateKey(res, SURROGATE_ENUMS.MANUAL) |
| 43 | |
| 44 | // Manually settings a Cache-Control because no other middleware |
| 45 | // will get a chance to do this later since we terminate here. |
| 46 | assetCacheControl(res) |
| 47 | |
| 48 | const { contentType, buffer } = MAP[req.path] |
| 49 | res.set('content-type', contentType) |
| 50 | |
| 51 | res.send(buffer()) |
| 52 | } |
nothing calls this directly
no test coverage detected