1

I have a file custom.lua and I want to add this plugin to a specific route of service.

I put the file code in Config.access but it is giving schema violation error. Also, used minifier as referenced in docs.

How can I add a custom plugin to the route? Do I need to format the code in the file in some way?

Update File contains (,) which is acting as delimiter, how to overcome it?

Rajat Aggarwal
  • 392
  • 3
  • 16

1 Answers1

0

The first step should be to register the custom plugin to kong and the next step is add the custom plugin to the specific route.
Here is the document for creating the first plugin.
https://konghq.com/blog/custom-lua-plugin-kong-gateway

Btw, I extemely double you are not coding the correct kong plugin since you mentioned the name "custom.lua" instead of handler.lua or schema.lua, kong plugin have their own structure you have to follow. Here is the Hello world plugin you can take a look: https://github.com/brndmg/kong-plugin-hello-world

masonlai
  • 1
  • 1
  • Was able to integrate the same file though Admin API /plugin call, could be some issue with Kong Manager GUI. – Rajat Aggarwal Jul 29 '21 at 14:02
  • Any success on this issue @RajatAggarwal? I am facing the same challenge of not being able to see the plugin on kong manager. I have installed the plugin on my kong-gateway v2.8 and I see it in the api response for GET http://localhost:8001/. I don't know the steps to make it available on the kong manager UI – Andy Dufresne Nov 21 '22 at 13:38