how to pass one of the incoming request header values to the downstream request path value
how to pass one of the incoming request header values to the downstream request path value in the ocelot configuration file using .net core 6.0 & ocelot 18.0
The incoming request has header information like property ex:11313
existing downstream has path <baseurl>/API/property/<propertyid>/details
upstream path is like <baseurl>/details
x-propertyid : "121212"
I know that, what ever header value coming in request. it will be forwarded to downstream systems.
in down stream system has to read the header value.. it requries code changes in downSteam systems.
with no changes to downstream systems. using gateway has to re-map request from header value to path of request. can you please sugget any solution for this?
{
"DownstreamPathTemplate": "/api/property/{propertyId}/details",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "<baseurl>",
"Port": 443
}
],
"UpstreamPathTemplate": "/propertydetails",
"UpstreamHttpMethod": [ "GET" ],
"Key": "getproperty"
},