You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/10/07 02:58:14 UTC

[GitHub] [apisix] spacewander commented on a change in pull request #2029: bugfix: only set one response header when enabled `enable_debug=true`

spacewander commented on a change in pull request #2029:
URL: https://github.com/apache/apisix/pull/2029#discussion_r500709172



##########
File path: apisix/plugin.lua
##########
@@ -228,13 +228,34 @@ function _M.api_routes()
 end
 
 
-function _M.filter(user_route, plugins)
+local function set_response_header_by_debug_flag(plugins, dry_run)
+    if dry_run then

Review comment:
       I think we can use `ngx.headers_sent` instead of passing flag manually.




----------------------------------------------------------------
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:
users@infra.apache.org