From 653ec0cbb0cb1a14d0f48b4d10b91007e8876be8 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Thu, 22 Nov 2018 23:17:58 +0900 Subject: [PATCH] No cache /notes/:note (#3382) --- src/server/activitypub.ts | 2 +- src/server/web/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/activitypub.ts b/src/server/activitypub.ts index 888feb08ce..0d4e244856 100644 --- a/src/server/activitypub.ts +++ b/src/server/activitypub.ts @@ -76,7 +76,7 @@ router.get('/notes/:note', async (ctx, next) => { } ctx.body = pack(await renderNote(note, false)); - ctx.set('Cache-Control', 'public, max-age=180'); + ctx.set('Cache-Control', 'private, max-age=0, must-revalidate'); setResponseType(ctx); }); diff --git a/src/server/web/index.ts b/src/server/web/index.ts index 616aaa36bb..42292cd398 100644 --- a/src/server/web/index.ts +++ b/src/server/web/index.ts @@ -111,7 +111,7 @@ router.get('/notes/:note', async ctx => { note: _note, summary: getNoteSummary(_note) }); - ctx.set('Cache-Control', 'public, max-age=180'); + ctx.set('Cache-Control', 'private, max-age=0, must-revalidate'); } else { ctx.status = 404; }