|
|
|
@ -173,12 +173,7 @@ namespace Ombi
|
|
|
|
|
settings.ApiKey = Guid.NewGuid().ToString("N");
|
|
|
|
|
ombiService.SaveSettings(settings);
|
|
|
|
|
}
|
|
|
|
|
if (settings.BaseUrl.HasValue())
|
|
|
|
|
{
|
|
|
|
|
app.UsePathBase(settings.BaseUrl);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
// Check if it's in the startup args
|
|
|
|
|
var appConfig = serviceProvider.GetService<IApplicationConfigRepository>();
|
|
|
|
|
var baseUrl = appConfig.Get(ConfigurationTypes.BaseUrl).Result;
|
|
|
|
@ -188,10 +183,11 @@ namespace Ombi
|
|
|
|
|
{
|
|
|
|
|
settings.BaseUrl = baseUrl.Value;
|
|
|
|
|
ombiService.SaveSettings(settings);
|
|
|
|
|
|
|
|
|
|
app.UsePathBase(settings.BaseUrl);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (settings.BaseUrl.HasValue())
|
|
|
|
|
{
|
|
|
|
|
app.UsePathBase(settings.BaseUrl);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
app.UseHangfireServer(new BackgroundJobServerOptions { WorkerCount = 1, ServerTimeout = TimeSpan.FromDays(1), ShutdownTimeout = TimeSpan.FromDays(1)});
|
|
|
|
|