- AddEnvironmentVariables() where appsettings.json is read directly - JWT ValidIssuer follows RSecurityBackend:ApplicationName (was hard-coded Ganjoor) - deploy/entrypoint.sh: copy settings RSecurityBackend reads only from appsettings.json - Dockerfile: pin SDK 10.0.302 (newer Razor rejects some upstream views) - lang=ur-PK; ganjoor.net own-site links -> relative; api.ganjoor.net -> APIRoot; search.xml - DIVAN.md: first admin password is Test!123 (upstream doc is wrong) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
773 B
C#
28 lines
773 B
C#
using Microsoft.Extensions.Configuration;
|
|
using System.IO;
|
|
|
|
namespace RMuseum
|
|
{
|
|
public static class WebServiceUrl
|
|
{
|
|
/// <summary>
|
|
/// url
|
|
/// </summary>
|
|
public static string Url
|
|
{
|
|
get
|
|
{
|
|
if (!string.IsNullOrEmpty(_url))
|
|
return _url;
|
|
IConfigurationRoot configuration = new ConfigurationBuilder()
|
|
.SetBasePath(Directory.GetCurrentDirectory()).AddJsonFile("appsettings.json").AddEnvironmentVariables() // divan: honour env overrides (Docker)
|
|
.Build();
|
|
_url = configuration["WebServiceUrl"];
|
|
return _url;
|
|
}
|
|
}
|
|
|
|
private static string _url = "";
|
|
}
|
|
}
|