apisix icon indicating copy to clipboard operation
apisix copied to clipboard

bug: ext-plugin-pre-req conf value doesn't allow anything else then string

Open mkyc opened this issue 1 year ago • 1 comments

Current Behavior

Currently only possible type passed to ext-plugin-pre-req value is string. So to pass anything else then just single value we need to encode it.

      plugins:
        - config:
            conf:
              - name: my-plugin
                value: "{\"test\":\"ugly\"}"
          enable: true
          name: ext-plugin-pre-req

Expected Behavior

It'd be much nicer to make it possible to pass anything there i.e.:

      plugins:
        - config:
            conf:
              - name: my-plugin
                value: 
                  test: "nice"
          enable: true
          name: ext-plugin-pre-req

Error Logs

No response

Steps to Reproduce

NA

Environment

NA

mkyc avatar Apr 16 '24 12:04 mkyc

I think it's somewhere here to be changed, but I'm not familiar with Lua well enough to propose PR.

mkyc avatar Apr 16 '24 12:04 mkyc