In the config file ( json ) of my program, there is a field whose value type is a list of objects. My question is, how can I edit it in the pipeline?
In the following case I want to change "DownstreamScheme" from "https" to "http".
How should I define the variable so that the program can do this?
{
"Routes": [
{
"DownstreamPathTemplate": "/{everything}",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 44354
}
],
"UpstreamPathTemplate": "/authentication/{everything}",
"UpstreamHttpMethod": [ "Get", "Post", "Put", "Delete" ]
//,
//"AuthenticationOptions": {
// "AuthenticationProviderKey": "Bearer",
// "AllowedScopes": []
//}
//,"RateLimitOptions": {
// "ClientWhitelist": [],
// "EnableRateLimiting": true,
// "Period": "5s",
// "PeriodTimespan": 1,
// "Limit": 1
//}
},
{
"DownstreamPathTemplate": "/{everything}",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 44333
}
],
"UpstreamPathTemplate": "/company/{everything}",
"UpstreamHttpMethod": [ "Get", "Post", "Put", "Delete" ]
},
{
"DownstreamPathTemplate": "/{everything}",
"DownstreamScheme": "https",
"DownstreamHostAndPorts": [
{
"Host": "localhost",
"Port": 44372
}
],
"UpstreamPathTemplate": "/navigator/{everything}",
"UpstreamHttpMethod": [ "Get", "Post", "Put", "Delete" ]
}
],
"GlobalConfiguration": {
"BaseUrl": "http://localhost:44395"
}
}
