Conditional Plugin execution based on edge Micro proxy?

Not applicable

Edge Micro has two proxies: Proxy_1 and Proxy_2 and several custom/in built plugins:

Proxy_1:

base_path: /doAction1

Proxy_2:

base_path: /doAction2

Plugin Relevance to Proxies
plugin1 Proxy_1
plugin2 Proxy_1 and Proxy_2
plugin3 Proxy_2

default.yaml:

  plugins:
    dir: ../plugins
    sequence:
    - plugin1
    - plugin2
    - plugin3

How do we control the execution of plugins which are relevant to each proxy from configuration or we have to explicitly check for some identifier within each plugin to skip or perform plugin action?

0 3 270
3 REPLIES 3

No there is no out of box way but in your plugin, you can decide to execute based on API/basePath call being made.

kkleva
New Member

You could build that conditional logic in the plugins but if your like me and have dozens of resource paths that's gonna get messy real quick.