1
0
Fork 0
mirror of https://github.com/miawinter98/just-short-it.git synced 2024-11-22 08:19:54 +00:00

fixed: BaseUrl is now properly read from configuration

This commit is contained in:
Mia Rose Winter 2023-11-17 23:19:08 +01:00
parent 9f53559c1f
commit ddf964ee4c
Signed by: miawinter
GPG key ID: 4B6F6A83178F595E

View file

@ -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<string>("BaseUrl") ?? throw new ApplicationException("BaseUrl not set");
BaseUrl = new Uri(url, UriKind.Absolute).ToString();
#endif
Db = db;
}