Skip to content

Commit

Permalink
Add 5 min cache on images
Browse files Browse the repository at this point in the history
  • Loading branch information
dellisd committed Jan 31, 2021
1 parent 7f91d62 commit 9c7b741
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/controllers/submissionController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ export const getSubmissionImage = async (req: Request, res: Response) => {

res.set('content-length', `${buffer?.length ?? 0}`)
res.set('content-type', coverMimeType);
res.set('cache-control', 'public, max-age=300')
res.status(200).end(buffer, 'binary');
} else {
res.sendStatus(404);
Expand Down

0 comments on commit 9c7b741

Please sign in to comment.