From ddf964ee4c67b46d7475178bb44bc5849db8cd5d Mon Sep 17 00:00:00 2001 From: Mia Winter Date: Fri, 17 Nov 2023 23:19:08 +0100 Subject: [PATCH] fixed: BaseUrl is now properly read from configuration --- Pages/Urls.cshtml.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Pages/Urls.cshtml.cs b/Pages/Urls.cshtml.cs index 54b317f..b2df01f 100644 --- a/Pages/Urls.cshtml.cs +++ b/Pages/Urls.cshtml.cs @@ -24,7 +24,8 @@ public class UrlsModel : PageModel { #if DEBUG BaseUrl = "https://localhost/"; #else - BaseUrl = new Uri(BaseUrl, UriKind.Absolute).ToString(); + string url = configuration.GetValue("BaseUrl") ?? throw new ApplicationException("BaseUrl not set"); + BaseUrl = new Uri(url, UriKind.Absolute).ToString(); #endif Db = db; }