Fixed: Sonarr UI Authentication cookie should be placed on path (UrlBase) instead of domain alone.

fixes #1874
pull/192/merge
Taloth Saldono 8 years ago
parent c94636e2b3
commit d726a7acb2

@ -33,12 +33,12 @@ namespace NzbDrone.Api.Authentication
{ {
if (_configFileProvider.AuthenticationMethod == AuthenticationType.Forms) if (_configFileProvider.AuthenticationMethod == AuthenticationType.Forms)
{ {
RegisterFormsAuth(pipelines); RegisterFormsAuth(pipelines);
} }
else if (_configFileProvider.AuthenticationMethod == AuthenticationType.Basic) else if (_configFileProvider.AuthenticationMethod == AuthenticationType.Basic)
{ {
pipelines.EnableBasicAuthentication(new BasicAuthenticationConfiguration(_authenticationService, "Sonarr")); pipelines.EnableBasicAuthentication(new BasicAuthenticationConfiguration(_authenticationService, "Sonarr"));
} }
pipelines.BeforeRequest.AddItemToEndOfPipeline((Func<NancyContext, Response>) RequiresAuthentication); pipelines.BeforeRequest.AddItemToEndOfPipeline((Func<NancyContext, Response>) RequiresAuthentication);
@ -68,6 +68,7 @@ namespace NzbDrone.Api.Authentication
{ {
RedirectUrl = _configFileProvider.UrlBase + "/login", RedirectUrl = _configFileProvider.UrlBase + "/login",
UserMapper = _authenticationService, UserMapper = _authenticationService,
Path = _configFileProvider.UrlBase,
CryptographyConfiguration = cryptographyConfiguration CryptographyConfiguration = cryptographyConfiguration
}); });
} }

Loading…
Cancel
Save