mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-20 13:23:20 -07:00
Added a url base
This commit is contained in:
parent
68624f6971
commit
1af3c21655
11 changed files with 54 additions and 31 deletions
|
@ -32,6 +32,7 @@ using Mono.Data.Sqlite;
|
|||
using Nancy;
|
||||
using Nancy.Authentication.Forms;
|
||||
using Nancy.Bootstrapper;
|
||||
using Nancy.Conventions;
|
||||
using Nancy.Cryptography;
|
||||
using Nancy.Diagnostics;
|
||||
using Nancy.Session;
|
||||
|
@ -60,6 +61,8 @@ namespace PlexRequests.UI
|
|||
// by overriding the various methods and properties.
|
||||
// For more information https://github.com/NancyFx/Nancy/wiki/Bootstrapper
|
||||
|
||||
private TinyIoCContainer _container;
|
||||
|
||||
protected override void ConfigureRequestContainer(TinyIoCContainer container, NancyContext context)
|
||||
{
|
||||
container.Register<IUserMapper, UserMapper>();
|
||||
|
@ -108,6 +111,7 @@ namespace PlexRequests.UI
|
|||
TaskManager.TaskFactory = new PlexTaskFactory();
|
||||
TaskManager.Initialize(new PlexRegistry());
|
||||
TaskManager.Initialize(new MediaCacheRegistry());
|
||||
_container = container;
|
||||
}
|
||||
|
||||
protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines)
|
||||
|
@ -132,7 +136,17 @@ namespace PlexRequests.UI
|
|||
(sender, certificate, chain, sslPolicyErrors) => true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected override void ConfigureConventions(NancyConventions nancyConventions)
|
||||
{
|
||||
base.ConfigureConventions(nancyConventions);
|
||||
|
||||
var settings = new SettingsServiceV2<PlexRequestSettings>(new SettingsJsonRepository(new DbConfiguration(new SqliteFactory()),new MemoryCacheProvider()));
|
||||
var assetLocation = settings.GetSettings().AssetLocation;
|
||||
nancyConventions.StaticContentsConventions.Add(
|
||||
StaticContentConventionBuilder.AddDirectory("assets", $"{assetLocation}/Content")
|
||||
);
|
||||
}
|
||||
|
||||
protected override DiagnosticsConfiguration DiagnosticsConfiguration => new DiagnosticsConfiguration { Password = @"password" };
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue