This repository was archived by the owner on May 7, 2024. It is now read-only.
For empty lists, use null instead of empty string #446
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Opening a new PR with a better
frombranch.When updating a plugin configuration, if the element is an array
and the update is to remove all elements from that list,
Konga was sending an empty string to represent the empty list.
When using the CORS plugin, the plugin code checks for the list to be
null, but not always for an empty list.
This patch makes Konga send a null instead of an empty string
when updating a plugin list to become an empty list.
Note: we are currently running Konga 0.13.0 because we have yet to migrate to Kong 1.0 (we have plugins that need to be updated first). That is why I made this change on the legacy branch. If you think this change is safe and you want it on master, just let me know and I can make another PR.