1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-02 09:46:06 +02:00

No caching /api/ (#3411)

This commit is contained in:
MeiMei
2018-11-27 01:16:25 +09:00
committed by syuilo
parent 33243e7176
commit b6fd5d7282

View File

@@ -19,6 +19,12 @@ app.use(cors({
origin: '*'
}));
// No caching
app.use(async (ctx, next) => {
ctx.set('Cache-Control', 'private, max-age=0, must-revalidate');
await next();
});
app.use(bodyParser({
// リクエストが multipart/form-data でない限りはJSONだと見なす
detectJSON: ctx => !ctx.is('multipart/form-data')