mirror of
https://github.com/miawinter98/just-short-it.git
synced 2024-11-22 00:09:54 +00:00
fixed: BaseUrl is now properly read from configuration
This commit is contained in:
parent
9f53559c1f
commit
ddf964ee4c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue