-
Notifications
You must be signed in to change notification settings - Fork 836
Konga plugin config removes newline from config values #189
Comments
What is the plugin's configuration (as stated in your .lua files)? This is def an issue with custom plugins and we have to discuss on how to solve it. Here's what happens. In order to create the plugin form dynamicaly, I get it's schema from Kongs API The response is something like this { "fields": { "hide_credentials": { "default": false, "type": "boolean" }, "key_names": { "default": "function", "required": true, "type": "array" } } } If a field type is I need a way to know, that the specific input must be a
|
This was our schema.lua
AFAIK Kong config types have no "textfield" equivalent. In the end we were able to configure Kong directly using:
I also have no idea how to differentiate whether config "string" should accept newlines or not. But since Kong accepts newlines for "string" my first suggestion would be to use HTML "textfield"s for every "string" config value. Then at least the GUI is consistent with the raw API. |
pull thel atest commit from master and check out if things work as expected |
Verified working @pantsel . Thanks a lot for the speedy fix. For others: I did have to clear my browser cache to see the changes, as Konga was still cached! |
This is in regard to the following comment:
#17 (comment)
We try to configure a custom plugin by adding a public key. But Konga will strip away any newline characters and replace them with spaces instead, which makes the public key invalid.
Version used:
latest
Docker tag forpantsel/konga
kong version: 0.12.2
Calling kong directly works. When tracing the AJAX call in Browser tools we can see the newlines being stripped away by Konga before sending the plugin config to the server.
The text was updated successfully, but these errors were encountered: