tzssangglass commented on a change in pull request #4961:
URL: https://github.com/apache/apisix/pull/4961#discussion_r701866192



##########
File path: apisix/plugin.lua
##########
@@ -299,18 +299,33 @@ local function trace_plugins_info_for_debug(plugins)
         core.table.insert(t, plugins[i].name)
     end
     if is_http and not ngx.headers_sent then
-        core.response.add_header("Apisix-Plugins", core.table.concat(t, ", "))
+        if ctx then
+            local debug_headers = ctx.debug_headers
+            if debug_headers then
+                if type(t) == "string" then
+                    core.table.insert(debug_headers, t)
+                end
+                if type(t) == "table" then
+                    for i, v in ipairs(t) do
+                        core.table.insert(debug_headers, v)

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.

To unsubscribe, e-mail: [email protected]

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


Reply via email to