What I would do would be to define the base url (URL0) as well as the "suffix" portion of the original 2
"url0": "https://test.com/"
"url1": "Account/ForgotUserName",
"url2": "Account/ForgotPassword"
And then I would create an
Extension method to combine and return those URLs
using System;
using System.Text;
public static class ConfigurationExtension {
public static string GetURL (this IConfiguration configuration, string urlName) {
StringBuilder url = new StringBuilder()
try {
url.Append(configuration["URL0"]);
url.Append(configuration[urlName]);
}
catch (Exception ex) {
}
return url.ToString();
}
}
And then to access you would simply use
var x=_config.GetURL("url1");