I've been trying to use express-gateway as a gateway for two (or more) versions of the frontend. We are studying if express-gateway could be an option to migrate smoothly our frontend versions, so we intend to have conditions a little more hidden in order to determine which API (Frontend server in our case) will retrieve the docs/information the client is asking (so we can have the same route retrieving different resources depending on some hidden condition, like headers or cookies).
Here lies my problem, I've seen you guys exposed of conditions and an expression condition for more customized kind of condition, but, as express already say in their docs, they don't expose headers on req object anymore, instead they created a function you can call for a property in the header object.
What I mean:
condition:
name: expression
expression: "req.header.my_prop='my value'" OR
expression: "req.cookies.my_prop='my value'"
So, I'm trying to understand if there's an alternative for that or is there something I'm missing in the documentation.
(I know retrieving static resources is not the purpose of the project, but we were trying to see if this could be an option)
I've been trying to use express-gateway as a gateway for two (or more) versions of the frontend. We are studying if express-gateway could be an option to migrate smoothly our frontend versions, so we intend to have conditions a little more hidden in order to determine which API (Frontend server in our case) will retrieve the docs/information the client is asking (so we can have the same route retrieving different resources depending on some hidden condition, like headers or cookies).
Here lies my problem, I've seen you guys exposed of conditions and an expression condition for more customized kind of condition, but, as express already say in their docs, they don't expose headers on req object anymore, instead they created a function you can call for a property in the header object.
What I mean:
So, I'm trying to understand if there's an alternative for that or is there something I'm missing in the documentation.
(I know retrieving static resources is not the purpose of the project, but we were trying to see if this could be an option)