diff --git a/www/www.vcl.tftpl b/www/www.vcl.tftpl index e97f8af..46d398f 100644 --- a/www/www.vcl.tftpl +++ b/www/www.vcl.tftpl @@ -230,7 +230,7 @@ sub vcl_recv { if (req.method !~ "^(GET|HEAD|POST|PUT|DELETE|OPTIONS|PATCH|FASTLYPURGE)") { error 806 "Not Implemented"; } - + %{ if private_extra_vcl_recv != "" ~} ${private_extra_vcl_recv} %{ endif ~} @@ -676,6 +676,10 @@ sub vcl_error { } } + if (beresp.http.Govuk-Rendered-Error) { + return (deliver); + } + # Assume we've hit vcl_error() because the backend is unavailable # for the first two retries. By restarting, vcl_recv() will try # serving from stale before failing over to the mirrors.