I’m trying to install the CORS plugin globally and keep hitting the following error: {"message":"schema violation (config.methods: expected one of: HEAD, GET, POST, PUT, PATCH, DELETE)","name":"schema violation","fields":{"config":{"methods":"expected one of: HEAD, GET, POST, PUT, PATCH, DELETE"}},"code":2}
The methods are defined in the plugin syntax by this: --data "config.methods=HEAD, GET, POST, PUT ,PATCH, DELETE"
The plugin works fine with a single method, but will not allow more than that. Under v.14, the plugin allowed multiple methods to be defined.
Are you using the proper syntax for arguments introduced in 0.13 for new endpoints (/routes, /services), and used in 1.0 for the /plugins endpoint? I have no problem specifying multiple methods in 1.0.3 with both application/x-www-form-urlencoded:
Same issue: you are using the old array notation (comma-separated) which isn’t accepted anymore as of Kong 1.0. Please read my above reply which explains how to send arrays with both of Kong’s Admin
s accepted Content-Type.
I followed this instruction https://docs.konghq.com/hub/kong-inc/cors/ for kong v. 1.0.x. Am I referring to a wrong documentation? Just so for me to know if I can proceed learning kong by it.
I can confirm that this works via application/json. I think the issue is that the documentation has not been updated to deprecate the old array notation (comma-separated). Kong 1.0.x still shows this as a valid config. This tripped us up as well. Thanks!