Don't cache the index page

This commit is contained in:
cmdr2 2022-09-09 21:54:13 +05:30
parent 75ac3450e6
commit c283d3181f

View File

@ -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():