Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Don't cache index.html (#4211)

bymyself33e5203a2a7b
diff --git a/server.py b/server.py
index 23ca2fd33..1c07f9781 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):