spacewander commented on a change in pull request #4817:
URL: https://github.com/apache/apisix/pull/4817#discussion_r688211410
##########
File path: apisix/plugins/gzip.lua
##########
@@ -21,17 +21,26 @@ local req_http_version = ngx.req.http_version
local str_sub = string.sub
local ipairs = ipairs
local tonumber = tonumber
+local type = type
local schema = {
type = "object",
properties = {
types = {
- type = "array",
- minItems = 1,
- items = {
- type = "string",
- minLength = 1,
+ anyOf = {
+ {
+ type = "array",
+ minItem = 1,
+ items = {
+ type = "string",
+ minLength = 1,
+ },
+ },
+ {
+ type = "string",
Review comment:
I think `enum = {"*"}` is enough?
##########
File path: t/plugin/gzip.t
##########
@@ -436,6 +436,53 @@ POST /echo
012345678
--- more_headers
Accept-Encoding: gzip
+Content-Type: text/html
Review comment:
Better to use a special type to verify that any type can be matched.
--
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]