mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
New: Support for running from a sub folder (reverse proxy)
This commit is contained in:
parent
cec479923f
commit
b5c9a811dd
22 changed files with 161 additions and 89 deletions
|
@ -31,6 +31,7 @@ namespace NzbDrone.Core.Configuration
|
|||
string ApiKey { get; }
|
||||
bool Torrent { get; }
|
||||
string SslCertHash { get; }
|
||||
string UrlBase { get; }
|
||||
}
|
||||
|
||||
public class ConfigFileProvider : IConfigFileProvider
|
||||
|
@ -152,6 +153,21 @@ namespace NzbDrone.Core.Configuration
|
|||
get { return GetValue("SslCertHash", ""); }
|
||||
}
|
||||
|
||||
public string UrlBase
|
||||
{
|
||||
get
|
||||
{
|
||||
var urlBase = GetValue("UrlBase", "");
|
||||
|
||||
if (String.IsNullOrEmpty(urlBase))
|
||||
{
|
||||
return urlBase;
|
||||
}
|
||||
|
||||
return "/" + urlBase.Trim('/').ToLower();
|
||||
}
|
||||
}
|
||||
|
||||
public int GetValueInt(string key, int defaultValue)
|
||||
{
|
||||
return Convert.ToInt32(GetValue(key, defaultValue));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue