question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can common config be written in "GlobalConfiguration"

See original GitHub issue

Expected Behavior / New Feature

The documentation states: 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 of Route specific settings.

Based on this, my understanding is that if the following few configurations are common for all the entries in ReRoutes, then the following way of putting it together should work:

"GlobalConfiguration": {
    "DownstreamScheme": "https",
    "DangerousAcceptAnyServerCertificateValidator": true,
    "QoSOptions": {
        "TimeoutValue": 60000
    }
}

Actual Behavior / Motivation for New Feature

It is not working at my end. Looks like one of the possibilities:

  1. My understanding is wrong: Then documentation should be made more explanatory.
  2. My understanding is right: Ocelot may have some problem. Since this configuration otherwise (if I repeat these in each entry in ReRoutes) has been working for 20 services that my Ocelot instance is serving.

In either case, please help!

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:5

github_iconTop GitHub Comments

1reaction
gao-arturcommented, Oct 30, 2020

Looks like GlobalConfiguration section is limited for specific scenarios. Check this file to see what can be configured via GlobalConfiguration. But you can extend it with PostConfigure trick. Check my answer on SO for example.

1reaction
nedimgcommented, Oct 28, 2020

Any updates on this? This would be a very nice feature to have…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Proper implementation of global configuration - c++
The way I used solve this is to put the variables in a separate global namespace, which is in a header file named...
Read more >
Using the Global Configuration Object
Setting global configuration with AWS.Config is often easier to get started, but service-level configuration can provide more control over individual services.
Read more >
Configuration in ASP.NET Core
Learn how to use the Configuration API to configure AppSettings in an ASP.NET Core app.
Read more >
Configuration — IDAES v2.0.0
A global configuration file won't exist unless a user creates one. The default configuration above can be used as a start.
Read more >
Configuring Jest
It is recommended to define the configuration in a dedicated JavaScript, TypeScript or JSON file. The file will be discovered automatically, if it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found