diff --git a/openhands/server/listen.py b/openhands/server/listen.py index 5a3e725da61d..76521144cee9 100644 --- a/openhands/server/listen.py +++ b/openhands/server/listen.py @@ -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')