summaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-11-23 08:01:29 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-11-23 08:01:29 +0900
commit7e803ff9a9400e835d3db1369b7ced73e42fcab9 (patch)
tree4e8c9ddfad0db6cf89396fa204351d045491d26a /src/server
parentImprove user operations (diff)
parentUpdate koa requirement from 2.6.1 to 2.6.2 (#3386) (diff)
downloadsharkey-7e803ff9a9400e835d3db1369b7ced73e42fcab9.tar.gz
sharkey-7e803ff9a9400e835d3db1369b7ced73e42fcab9.tar.bz2
sharkey-7e803ff9a9400e835d3db1369b7ced73e42fcab9.zip
Merge branch 'develop' of https://github.com/syuilo/misskey into develop
Diffstat (limited to 'src/server')
-rw-r--r--src/server/activitypub.ts2
-rw-r--r--src/server/api/common/signin.ts4
-rw-r--r--src/server/web/index.ts2
3 files changed, 4 insertions, 4 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/api/common/signin.ts b/src/server/api/common/signin.ts
index 8d44b377fe..3a5ba0ea04 100644
--- a/src/server/api/common/signin.ts
+++ b/src/server/api/common/signin.ts
@@ -9,8 +9,8 @@ export default function(ctx: Koa.Context, user: ILocalUser, redirect = false) {
path: '/',
domain: config.hostname,
// SEE: https://github.com/koajs/koa/issues/974
- //secure: config.url.startsWith('https'),
- secure: false,
+ // When using a SSL proxy it should be configured to add the "X-Forwarded-Proto: https" header
+ secure: config.url.startsWith('https'),
httpOnly: false,
expires: new Date(Date.now() + expires),
maxAge: expires
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;
}