Only apply preview auth if Umbraco is fully configured

This commit is contained in:
Shannon
2016-03-16 10:41:33 +01:00
parent 800e02bccf
commit 2f9b526465

View File

@@ -271,7 +271,7 @@ namespace Umbraco.Web.Security.Identity
public static IAppBuilder UseUmbracoPreviewAuthentication(this IAppBuilder app, ApplicationContext appContext, PipelineStage stage)
{
//don't apply if app isnot ready
if (appContext.IsUpgrading || appContext.IsConfigured)
if (appContext.IsConfigured)
{
var authOptions = CreateCookieAuthOptions();
app.Use(typeof(PreviewAuthenticationMiddleware), authOptions);