OpenHands icon indicating copy to clipboard operation
OpenHands copied to clipboard

Fix issue #4127: [Bug]: Disable cache on web application's index.html

Open openhands-agent opened this issue 1 year ago • 1 comments

This pull request fixes #4127.

This PR addresses the caching issue for the root path '/' and '/index.html' by modifying the openhands/server/listen.py file. Two new routes have been added for these paths, serving the index.html file from the ./frontend/dist directory. The Cache-Control header has been set to 'no-store, max-age=0' for both routes, effectively preventing caching. This should resolve the problem of the frontend breaking on updates due to caching. The original static file mounting remains intact for serving other static assets. These changes ensure that the frontend will update properly on each refresh, addressing the reported issue without affecting other functionality.

Automatic fix generated by OpenHands 🙌

openhands-agent avatar Sep 30 '24 22:09 openhands-agent

@rbren what're we thinking for this PR?

mamoodi avatar Nov 01 '24 16:11 mamoodi

I think I fixed this elsewhere

rbren avatar Nov 04 '24 22:11 rbren