Specify AP Cache-Control (#2735)
This commit is contained in:
parent
609d68933e
commit
8414db57f0
5 changed files with 9 additions and 0 deletions
|
@ -34,5 +34,6 @@ export default async (ctx: Router.IRouterContext) => {
|
|||
);
|
||||
|
||||
ctx.body = pack(rendered);
|
||||
ctx.set('Cache-Control', 'private, max-age=0, must-revalidate');
|
||||
setResponseType(ctx);
|
||||
};
|
||||
|
|
|
@ -78,6 +78,7 @@ export default async (ctx: Router.IRouterContext) => {
|
|||
// index page
|
||||
const rendered = renderOrderedCollection(partOf, user.followersCount, `${partOf}?page=true`, null);
|
||||
ctx.body = pack(rendered);
|
||||
ctx.set('Cache-Control', 'private, max-age=0, must-revalidate');
|
||||
setResponseType(ctx);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -78,6 +78,7 @@ export default async (ctx: Router.IRouterContext) => {
|
|||
// index page
|
||||
const rendered = renderOrderedCollection(partOf, user.followingCount, `${partOf}?page=true`, null);
|
||||
ctx.body = pack(rendered);
|
||||
ctx.set('Cache-Control', 'private, max-age=0, must-revalidate');
|
||||
setResponseType(ctx);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -88,6 +88,7 @@ export default async (ctx: Router.IRouterContext) => {
|
|||
);
|
||||
|
||||
ctx.body = pack(rendered);
|
||||
ctx.set('Cache-Control', 'private, max-age=0, must-revalidate');
|
||||
setResponseType(ctx);
|
||||
} else {
|
||||
// index page
|
||||
|
@ -96,6 +97,7 @@ export default async (ctx: Router.IRouterContext) => {
|
|||
`${partOf}?page=true&since_id=000000000000000000000000`
|
||||
);
|
||||
ctx.body = pack(rendered);
|
||||
ctx.set('Cache-Control', 'private, max-age=0, must-revalidate');
|
||||
setResponseType(ctx);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue