Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 2 commits into from

Conversation

openhands-agent
Copy link
Contributor

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 🙌

@mamoodi
Copy link
Collaborator

mamoodi commented Nov 1, 2024

@rbren what're we thinking for this PR?

@rbren
Copy link
Collaborator

rbren commented Nov 4, 2024

I think I fixed this elsewhere

@rbren rbren closed this Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Disable cache on web application's index.html
3 participants