Sometimes a Rails application may crash due to some kind of error, and when accessing certain URLs at the factory, someone may land on the /500.html page.
It's okay for now. We can see through the logs what the problem is and then fix it. However, to view the page correctly, we must clear the browser cache, otherwise we will be redirected to /500.html again
Is there any way to prevent this?
The following describes an example workflow:
- Go to www.whatever.com/order/view/4444
- Due to a problem with our data / code, the user is redirected to www.whatever.com/500.html
- We review logs, identify the problem and fix it.
- If I DO NOT clear the browser cache, after trying to go to www.whatever.com/order/view/4444, I am redirected to /500.html again
- If I clear the cache everything works fine
Is there something we can do in the Rails or Nginx configuration so that I donโt have to clear the browser cache after changing the Rails application?
nginx.conf
myapp.conf
server { listen 80; server_name example.com www.example.com;
source share