spacewander commented on code in PR #6949:
URL: https://github.com/apache/apisix/pull/6949#discussion_r862465071


##########
apisix/plugins/api-breaker.lua:
##########
@@ -35,6 +35,13 @@ local schema = {
             minimum = 200,
             maximum = 599,
         },
+        break_response_body = {
+            type = "string"
+        },
+        break_response_content_type = {

Review Comment:
   > Ok, i'll browse all the plugins which should be with a content-type field 
and submit an issue with a checklist.
   
   It is not a good idea, as this check won't fix the non-open-source plugins.
   
   One solution is to guess:
   1. according to the response body: 
https://github.com/apache/apisix/blob/cc88a8db0ba64e1cb351e389ca5ec64c516073d6/apisix/control/router.lua#L81
 or using https://github.com/spacewander/lua-resty-mime-sniff
   2. according to the Accept header or the ext part of the uri
   
   Another solution is to configure it in the route



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