tzssangglass commented on code in PR #6949:
URL: https://github.com/apache/apisix/pull/6949#discussion_r860902040
##########
apisix/plugins/api-breaker.lua:
##########
@@ -158,6 +165,11 @@ function _M.access(conf, ctx)
-- breaker
if lasttime + breaker_time >= ngx.time() then
+ if conf.break_response_body then
+ core.response.clear_header_as_body_modified()
+ ngx.header["Content-Type"] = conf.break_response_content_type
Review Comment:
```suggestion
if conf.break_response_content_type then
core.response.set_header("Content-Type",
conf.break_response_content_type)
end
```
--
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]