Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure custom errors are served for GOV.UK Chat
We've added custom error pages for our 500 and 503 errors. This updates the vcl_error subroutine to serve these custom error pages when the 'Govuk-Rendered-Error' header is set. Our application returns a 503 status code when public access is toggled off. I'm unsure if there are other cases where we may receive a 503 status code and Roch thinks that the load balancer will return a 500 status if the application is down. To ensure that we don't accidentally move to the deliver subroutine when a 500 or 503 is returned without our custom error page we came up with the idea of adding a header which indicates that we want to serve the page from the application. This change adds a check for the 'Govuk-Rendered-Error' header in the vcl_error subroutine. If present it moves to the deliver subroutine to serve the custom error page.
- Loading branch information