-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DownstreamHostAndPorts alias #692
Comments
@philproctor any update on this enhancement? |
…reference it in route config
Check my answer on SO. It does exactly what you are asking for |
@gao-artur I had to put the configuration in my appsettings and not in the ocelot.json to make it work. But it solved my problem, thanks! |
…reference it in route config
Thanks all for finally addressing this. However, I must say I've moved on from this project since I filed this issue it in 2018. Going to un-assign myself. |
Sad to hear that! |
@NicoJuicy Welcome to #1353 (comment) ❕ |
Hello everyone! Unfortunately, the previously linked PR #1353 has been closed. |
My team and I are test-driving Ocelot for a new project. We are wondering if it is possible to alias the
DownstreamHostAndPorts
somehow without having to repeat it for many endpoints. This is especially important to us when we think about overriding host and port per environment.For example, for development purposes, we want to have Host and Port set to localhost and 5005, but for staging and production to a different host name and port. I understand that this is possible to do via override, but we'd rather not duplicate the entire definition again.
We'd like to define multiple hosts and ports in the global configuration and reference them in the downstream host and ports section.
Example:
Then, in the "ReRoutes" config, we'd use it instead of the host definition:
Is this a use case you have come across? I guess, as a workaround, we could define host names in the hosts file of the system, but that requires all devs to have the same entries.
Specifications
The text was updated successfully, but these errors were encountered: