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

enhance(frontend): フロントエンドのキャッシュクリア操作でブラウザの内部キャッシュも削除するように (#16522)

* enhance(frontend): フロントエンドのキャッシュクリア操作でブラウザの内部キャッシュも削除するように

* 削除するキャッシュを増やす

* Update Changelog

* fix: 何らかのエラーがあっても無視するように
This commit is contained in:
かっこかり
2025-09-06 14:46:24 +09:00
committed by GitHub
parent 6cf1f86636
commit 788c5660ba
5 changed files with 32 additions and 2 deletions

View File

@@ -176,6 +176,17 @@ export class ApiServerService {
}
});
fastify.all('/clear-browser-cache', (request, reply) => {
if (['GET', 'POST'].includes(request.method)) {
reply.header('Clear-Site-Data', '"cache", "prefetchCache", "prerenderCache", "executionContexts"');
reply.code(204);
reply.send();
} else {
reply.code(405);
reply.send();
}
});
// Make sure any unknown path under /api returns HTTP 404 Not Found,
// because otherwise ClientServerService will return the base client HTML
// page with HTTP 200.