liangliang4ward commented on a change in pull request #6392:
URL: https://github.com/apache/apisix/pull/6392#discussion_r811021212



##########
File path: apisix/init.lua
##########
@@ -589,22 +589,29 @@ function _M.http_header_filter_phase()
     core.response.set_header("Server", ver_header)
 
     local up_status = get_var("upstream_status")
-    if up_status and #up_status == 3
-       and tonumber(up_status) >= 500
-       and tonumber(up_status) <= 599
-    then
-        set_resp_upstream_status(up_status)
-    elseif up_status and #up_status > 3 then
-        -- the up_status can be "502, 502" or "502, 502 : "
-        local last_status
-        if str_byte(up_status, -1) == str_byte(" ") then
-            last_status = str_sub(up_status, -6, -3)
+    if up_status then
+        local_conf = core.config.local_conf();
+        if local_conf.apisix and local_conf.apisix.enable_all_upstream_status 
then

Review comment:
       That's a good idear




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to