mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-19 21:44:30 -04:00
New: Support for running from a sub folder (reverse proxy)
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user