Placeholder in DownstreamHostAndPorts
See original GitHub issueIs it possible to achieve this with Ocelot?
Environment Variables
ApiName
: account
EnvironmentName
: dev
{
"Routes": [
{
"DownstreamPathTemplate": "/{everything}",
"DownstreamScheme": "http",
"UpstreamPathTemplate": "/{everything}",
"UpstreamHttpMethod": ["Get", "Put", "Delete", "Post"],
"DownstreamHostAndPorts": [{
"Host": "api.{ApiName}.{EnvironmentName}",
"Port": 80
}
]
}
],
"GlobalConfiguration": {
"BaseUrl": "https://localhost:8080"
}
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Ocelot placeholder for downstream host
I want to change the Host in the DownstreamHostAndPorts at runtime as by this time from grabbing the claims out of the jwt...
Read more >Routing — Ocelot 1.0.0 documentation
The placeholder variable needs to be present in both the DownstreamPathTemplate and UpstreamPathTemplate properties. When it is Ocelot will attempt to ...
Read more >Ocelot Documentation
Ocelot is aimed at people using .NET running a micro services / service orientated architecture that need a unified.
Read more >Developers - Placeholder value does not correctly replace when ...
The specified placeholder variable value should be replaced within the Downstream URI provided in the UpstreamPathTemplate and DownStreamPathTemplate.
Read more >Implementing an API Gateway in ASP.NET Core with Ocelot
Learn what an API Gateway is and how to build yours in ASP.NET Core by using Ocelot.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
You can easily add it yourself https://stackoverflow.com/a/63601248/2557855
Can this be achieved on the current Ocelot version?