Firstsawyou commented on a change in pull request #2817: URL: https://github.com/apache/apisix/pull/2817#discussion_r530465858
########## File path: apisix/init.lua ########## @@ -630,10 +630,11 @@ end function _M.http_header_filter_phase() core.response.set_header("Server", ver_header) - local status_code = tonumber(get_var("upstream_status")) - if status_code and status_code >= 500 and status_code <= 599 then - core.response.set_header("X-APISIX-Upstream-Status", status_code) - core.log.info("X-APISIX-Upstream-Status: ", status_code) + local up_status = get_var("upstream_status") + local from, _ = re_find(up_status, "5[0-9]{2}", "jo") Review comment: done. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org