From 709fd3af9ff0a6a649d7c62d5ddba6bef83db1b3 Mon Sep 17 00:00:00 2001 From: HF Date: Fri, 6 Nov 2020 01:31:54 +0100 Subject: [PATCH] no caching for chathistory --- src/routes/api/chathistory.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/routes/api/chathistory.js b/src/routes/api/chathistory.js index cac178a..1e70869 100644 --- a/src/routes/api/chathistory.js +++ b/src/routes/api/chathistory.js @@ -11,6 +11,12 @@ import chatProvider from '../../core/ChatProvider'; async function chatHistory(req: Request, res: Response) { let { cid, limit } = req.query; + res.set({ + 'Cache-Control': 'no-cache, no-store, must-revalidate', + Pragma: 'no-cache', + Expires: '0', + }); + if (!cid || !limit) { res.status(400); res.json({