Cache extra AP objects (#6349)
* Cache extra AP objects * Cache nodeinfo
This commit is contained in:
parent
6667b86650
commit
36fcc0d5f6
5 changed files with 6 additions and 5 deletions
|
|
@ -81,6 +81,7 @@ router.get(nodeinfo2_1path, async ctx => {
|
|||
const base = await nodeinfo2();
|
||||
|
||||
ctx.body = { version: '2.1', ...base };
|
||||
ctx.set('Cache-Control', 'public, max-age=600');
|
||||
});
|
||||
|
||||
router.get(nodeinfo2_0path, async ctx => {
|
||||
|
|
@ -89,6 +90,7 @@ router.get(nodeinfo2_0path, async ctx => {
|
|||
delete base.software.repository;
|
||||
|
||||
ctx.body = { version: '2.0', ...base };
|
||||
ctx.set('Cache-Control', 'public, max-age=600');
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue