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;
}