Compare commits

...

2 Commits

Author SHA1 Message Date
Robert Brennan
8e832f9653 Merge branch 'main' into openhands-fix-issue-4127 2024-10-01 12:44:52 -04:00
openhands
d86f7a7e12 Fix issue #4127: '[Bug]: Disable cache on web application'"'"'s index.html' 2024-09-30 22:50:56 +00:00

View File

@@ -753,4 +753,16 @@ async def security_api(request: Request):
)
@app.get("/", response_class=FileResponse)
async def read_root():
response = FileResponse("./frontend/dist/index.html")
response.headers["Cache-Control"] = "no-store, max-age=0"
return response
@app.get("/index.html", response_class=FileResponse)
async def read_index():
response = FileResponse("./frontend/dist/index.html")
response.headers["Cache-Control"] = "no-store, max-age=0"
return response
app.mount('/', StaticFiles(directory='./frontend/dist', html=True), name='dist')