From c283d3181f467e28195b0f8783d8cad72f6bca23 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Fri, 9 Sep 2022 21:54:13 +0530 Subject: [PATCH] Don't cache the index page --- ui/server.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/server.py b/ui/server.py index e287f5f1..4a91a92b 100644 --- a/ui/server.py +++ b/ui/server.py @@ -51,7 +51,8 @@ class SetAppConfigRequest(BaseModel): @app.get('/') def read_root(): - return FileResponse(os.path.join(SD_UI_DIR, 'index.html')) + headers = {"Cache-Control": "no-cache, no-store, must-revalidate", "Pragma": "no-cache", "Expires": "0"} + return FileResponse(os.path.join(SD_UI_DIR, 'index.html'), headers=headers) @app.get('/ping') async def ping():