Changing request URL in middleware


#1

I am trying to build a dynamic upstream response. I want to change the upstream call based on information in a key meta or the api config_data.

Question is can i do that in a Pre middleware hook, or virtual endpoint and can i change the destination of the call on the fly?


#2

Hi Kariuki, thanks for your question.
Did you look at https://tyk.io/blog/tyk-2-8-api-gateway-feel-the-force/ ? Look under “looping”, that should solve your challenge, yes? more details in the release notes: https://tyk.io/docs/release-notes/version-2.8/

Cheers,
/mike