Explicitly set max-age (#3330)
This commit is contained in:
parent
ca0cb6fd42
commit
e332e3c248
3 changed files with 10 additions and 0 deletions
|
|
@ -94,6 +94,7 @@ router.get('/@:user', async (ctx, next) => {
|
|||
|
||||
if (user != null) {
|
||||
await ctx.render('user', { user });
|
||||
ctx.set('Cache-Control', 'public, max-age=180');
|
||||
} else {
|
||||
// リモートユーザーなので
|
||||
await next();
|
||||
|
|
@ -110,6 +111,7 @@ router.get('/notes/:note', async ctx => {
|
|||
note: _note,
|
||||
summary: getNoteSummary(_note)
|
||||
});
|
||||
ctx.set('Cache-Control', 'public, max-age=180');
|
||||
} else {
|
||||
ctx.status = 404;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue