mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-27 02:07:41 +00:00
Configure URLs on Linux, but don't register them
This commit is contained in:
parent
b5c9a811dd
commit
b16360fd39
2 changed files with 8 additions and 5 deletions
|
@ -43,7 +43,7 @@ namespace NzbDrone.Host.AccessControl
|
||||||
var localHttpsUrls = BuildUrls("https", "localhost", _configFileProvider.SslPort);
|
var localHttpsUrls = BuildUrls("https", "localhost", _configFileProvider.SslPort);
|
||||||
var wildcardHttpsUrls = BuildUrls("https", "*", _configFileProvider.SslPort);
|
var wildcardHttpsUrls = BuildUrls("https", "*", _configFileProvider.SslPort);
|
||||||
|
|
||||||
if (!_runtimeInfo.IsAdmin)
|
if (OsInfo.IsWindows && !_runtimeInfo.IsAdmin)
|
||||||
{
|
{
|
||||||
var httpUrls = wildcardHttpUrls.All(IsRegistered) ? wildcardHttpUrls : localHttpUrls;
|
var httpUrls = wildcardHttpUrls.All(IsRegistered) ? wildcardHttpUrls : localHttpUrls;
|
||||||
var httpsUrls = wildcardHttpsUrls.All(IsRegistered) ? wildcardHttpsUrls : localHttpsUrls;
|
var httpsUrls = wildcardHttpsUrls.All(IsRegistered) ? wildcardHttpsUrls : localHttpsUrls;
|
||||||
|
@ -55,9 +55,12 @@ namespace NzbDrone.Host.AccessControl
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Urls.AddRange(wildcardHttpUrls);
|
Urls.AddRange(wildcardHttpUrls);
|
||||||
Urls.AddRange(wildcardHttpsUrls);
|
Urls.AddRange(wildcardHttpsUrls);
|
||||||
|
|
||||||
RefreshRegistration();
|
if (OsInfo.IsWindows)
|
||||||
|
{
|
||||||
|
RefreshRegistration();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -53,10 +53,10 @@ namespace NzbDrone.Host.Owin
|
||||||
_firewallAdapter.MakeAccessible();
|
_firewallAdapter.MakeAccessible();
|
||||||
_sslAdapter.Register();
|
_sslAdapter.Register();
|
||||||
}
|
}
|
||||||
|
|
||||||
_urlAclAdapter.ConfigureUrl();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_urlAclAdapter.ConfigureUrl();
|
||||||
|
|
||||||
var options = new StartOptions()
|
var options = new StartOptions()
|
||||||
{
|
{
|
||||||
ServerFactory = "Microsoft.Owin.Host.HttpListener"
|
ServerFactory = "Microsoft.Owin.Host.HttpListener"
|
||||||
|
|
Loading…
Reference in a new issue