In ASP.Net Core it's possible to inject config values into a class using
From the docs Using options and configuration objects that is not possible:
The options pattern enables using custom options classes to represent a group of related settings. A class needs to have a public read-write property for each setting and a constructor that does not take any parameters (e.g. a default constructor) in order to be used as an options class.
That means you need to generate a class to read it's configuration value(s). But in your sample
RootUrlcannot be constructed via a class.