Remove Base Url Support (#652)
* Fixed some issues with base url. All Scheduled jobs are now in user's timezone * Hide Base Url support from UI and removed some code around it on the backend to prevent it from interfering. Patched back in changes from base-href branch like Timezone on scheduled jobs and enhanced logging. * Added parser support for "2000 AD 0366 [1984-04-28] (flopbie)" and removed for "01 Spiderman 01".
This commit is contained in:
parent
ec3fe7fd8a
commit
06508fd909
11 changed files with 63 additions and 120 deletions
|
@ -162,16 +162,20 @@ namespace API
|
|||
|
||||
app.UseDefaultFiles();
|
||||
|
||||
var service = serviceProvider.GetRequiredService<IUnitOfWork>();
|
||||
var settings = service.SettingsRepository.GetSettingsDto();
|
||||
if (!string.IsNullOrEmpty(settings.BaseUrl) && !settings.BaseUrl.Equals("/"))
|
||||
{
|
||||
var path = !Configuration.BaseUrl.StartsWith("/")
|
||||
? $"/{Configuration.BaseUrl}"
|
||||
: Configuration.BaseUrl;
|
||||
app.UsePathBase(path);
|
||||
Console.WriteLine("Starting with base url as " + path);
|
||||
}
|
||||
// This is not implemented completely. Commenting out until implemented
|
||||
// var service = serviceProvider.GetRequiredService<IUnitOfWork>();
|
||||
// var settings = service.SettingsRepository.GetSettingsDto();
|
||||
// if (!string.IsNullOrEmpty(settings.BaseUrl) && !settings.BaseUrl.Equals("/"))
|
||||
// {
|
||||
// var path = !settings.BaseUrl.StartsWith("/")
|
||||
// ? $"/{settings.BaseUrl}"
|
||||
// : settings.BaseUrl;
|
||||
// path = !path.EndsWith("/")
|
||||
// ? $"{path}/"
|
||||
// : path;
|
||||
// app.UsePathBase(path);
|
||||
// Console.WriteLine("Starting with base url as " + path);
|
||||
// }
|
||||
|
||||
app.UseStaticFiles(new StaticFileOptions
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue