Global UpstreamHeaderTransform settings in GlobalConfiguration section
See original GitHub issueNew Feature
Add UpstreamHeaderTransform globally for all routes.
Motivation for New Feature
Currently we have to set the same transforms on all routes, leaving a lot of copy paste work.
"UpstreamHeaderTransform": {
"X-Forwarded-For": "{RemoteIpAddress}",
"X-Forwarded-Host": "{BaseUrl}",
"X-Forwarded-Proto": "https"
}
A solution would be to also set global transforms in GlobalConfiguration
Related to
Feature: Headers Transformation
Issue Analytics
- State:
- Created 4 months ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Configuration — Ocelot 1.0.0 documentation
The Global configuration is a bit hacky and allows overrides of Route specific settings. It's useful if you don't want to manage lots...
Read more >Ocelot Documentation
a GlobalConfiguration. The Routes are the objects that tell Ocelot how to treat an upstream request. The Global configuration is a bit hacky ......
Read more >Can common config be written in "GlobalConfiguration"
The documentation states: The Global configuration is a bit hacky and allows overrides of Route specific settings.
Read more >Playing around with headers in Ocelot - danpatrascu.com -
We can choose to add custom headers to all requests, we can specify only certain re-routes that should have headers, we can take...
Read more >Designing and implementing API Gateways with Ocelot in . ...
The Global configuration allows overrides of ReRoute specific settings. It's useful if you don't want to manage lots of ReRoute specific ...
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
I do not currently have a solution for it no, but I’d say it would be pretty easy to implement.
Could be a new
DefaultUpstreamHeaderTransform
andDefaultDownstreamHeaderTransform
on theGlobalConfiguration
object.Then, if there is a header transform set on a route which is also a default, that would “win” over the default one (so you can override specific headers on specific routes).
Added a PR