'Specify which plugins to use on a route in Kong dbless mode

In dbless mode on kong we can specify which routes to be added on plugin using this declration:

plugins:
- name: jwt
  route: <route>
  config: 
    secret_is_base64: false

But I need to specify which plugins this route is going to use with something like:

route:
- name: getUser
  paths:
    - /user
  plugins: [<plugin1>, <plugin2>]

Any way to do this? I dont want to update all the plugin declarations everytime I add a new API on a service.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source