mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-25 15:26:43 -06:00
No caching /api/ (#3411)
This commit is contained in:
parent
33243e7176
commit
b6fd5d7282
1 changed files with 6 additions and 0 deletions
|
@ -19,6 +19,12 @@ app.use(cors({
|
||||||
origin: '*'
|
origin: '*'
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
// No caching
|
||||||
|
app.use(async (ctx, next) => {
|
||||||
|
ctx.set('Cache-Control', 'private, max-age=0, must-revalidate');
|
||||||
|
await next();
|
||||||
|
});
|
||||||
|
|
||||||
app.use(bodyParser({
|
app.use(bodyParser({
|
||||||
// リクエストが multipart/form-data でない限りはJSONだと見なす
|
// リクエストが multipart/form-data でない限りはJSONだと見なす
|
||||||
detectJSON: ctx => !ctx.is('multipart/form-data')
|
detectJSON: ctx => !ctx.is('multipart/form-data')
|
||||||
|
|
Loading…
Reference in a new issue