krakend-ce icon indicating copy to clipboard operation
krakend-ce copied to clipboard

Unable to Retrieve Path Variables in KrakenD Backend Plugin for Dynamic Endpoints

Open JavedMohammadTechie opened this issue 5 months ago • 1 comments

Hello KrakenD community,

I'm currently facing an issue with extracting path variables from dynamic endpoints in KrakenD when using a custom backend plugin. Specifically, I have an endpoint configured as follows:

image

I need to access these dynamic values (rollNo and section) within my backend plugin to perform certain operations based on the provided path variables. However, despite my attempts, I have been unable to retrieve these path variables in my backend plugin.

I've explored the available documentation and resources, but I couldn't find a clear solution for this scenario. Could someone please guide me on how to properly access the path variables from dynamic endpoints within a KrakenD backend plugin?

Any insights, code snippets, or pointers to relevant documentation would be greatly appreciated. Thank you in advance for your assistance!

JavedMohammadTechie avatar Mar 19 '24 10:03 JavedMohammadTechie

Hi @JavedMohammadTechie as far as I know you don't have access to those variables inside server plugins... the only place where you have access to them is inside a request modifier https://github.com/luraproject/lura/blob/master/proxy/plugin.go#L201 Best regards

nsitbon avatar Mar 28 '24 08:03 nsitbon