diff --git a/t/APISIX.pm b/t/APISIX.pm index 8bbe247050c8..999bcd8a1994 100644 --- a/t/APISIX.pm +++ b/t/APISIX.pm @@ -597,6 +597,21 @@ _EOC_ more_clear_headers Date; } + + # this configuration is needed as error_page is configured in http block + location \@50x.html { + set \$from_error_page 'true'; + content_by_lua_block { + require("apisix.error_handling").handle_500() + } + header_filter_by_lua_block { + apisix.http_header_filter_phase() + } + + log_by_lua_block { + apisix.http_log_phase() + } + } } $a6_ngx_directives