From 33e5203a2a7bc90dc4c6577ed645456abc530155 Mon Sep 17 00:00:00 2001 From: bymyself Date: Mon, 5 Aug 2024 09:25:28 -0700 Subject: [PATCH] Don't cache index.html (#4211) --- server.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index 23ca2fd3..1c07f978 100644 --- a/server.py +++ b/server.py @@ -127,7 +127,11 @@ class PromptServer(): @routes.get("/") async def get_root(request): - return web.FileResponse(os.path.join(self.web_root, "index.html")) + response = web.FileResponse(os.path.join(self.web_root, "index.html")) + response.headers['Cache-Control'] = 'no-cache' + response.headers["Pragma"] = "no-cache" + response.headers["Expires"] = "0" + return response @routes.get("/embeddings") def get_embeddings(self):