Skip to content

Commit

Permalink
fix: no cache for any API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
ec2sw committed Jun 27, 2022
1 parent e4ce5e6 commit c5ed5f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ app.use(async function (req, res, next) {
}
});

app.use(function (req, res, next) {
res.set('Cache-control', 'no-store');
next();
})

// Add optional API key if set in .env file
app.use(function (req, res, next) {
if (API_KEY && API_KEY !== '') {
Expand Down

0 comments on commit c5ed5f7

Please sign in to comment.