protected override IResponse CreateResponse(UnicornControlPanelRequestPipelineArgs args) { var config = args.Context.Request.QueryString["configuration"]; var targetConfigurations = ControlPanelUtility.ResolveConfigurationsFromQueryParameter(config); var result = targetConfigurations.Select(GetHealthStatus); return(new PlainTextResponse(string.Join(Environment.NewLine, result))); }
public virtual void ProcessRequest(HttpContext context) { context.Server.ScriptTimeout = 86400; // workaround to allow streaming output without an exception in Sitecore 8.1 Update-3 and later context.Response.Headers["X-Frame-Options"] = "SAMEORIGIN"; var verb = context.Request.QueryString["verb"]; var authProvider = UnicornConfigurationManager.AuthenticationProvider; SecurityState securityState; if (authProvider != null) { securityState = UnicornConfigurationManager.AuthenticationProvider.ValidateRequest(new HttpRequestWrapper(HttpContext.Current.Request)); } else { securityState = new SecurityState(false, false); } // this securitydisabler allows the control panel to execute unfettered when debug compilation is enabled but you are not signed into Sitecore using (new SecurityDisabler()) { var pipelineArgs = new UnicornControlPanelRequestPipelineArgs(verb, new HttpContextWrapper(context), securityState); CorePipeline.Run("unicornControlPanelRequest", pipelineArgs, true); if (pipelineArgs.Response == null) { pipelineArgs.Response = new PlainTextResponse("Not Found", HttpStatusCode.NotFound); } if (securityState.IsAllowed) { context.Response.AddHeader("X-Unicorn-Version", UnicornVersion.Current); } pipelineArgs.Response.Execute(new HttpResponseWrapper(context.Response)); } }
protected override IResponse CreateResponse(UnicornControlPanelRequestPipelineArgs args) { return(new WebConsoleResponseFun("Sync Unicorn", args.SecurityState.IsAutomatedTool, new HeadingServiceFun(), progress => Process(progress, new WebConsoleLogger(progress, args.Context.Request.QueryString["log"])))); }
protected override IResponse CreateResponse(UnicornControlPanelRequestPipelineArgs args) { return(new PlainTextResponse(UnicornVersion.Current)); }
protected override IResponse CreateResponse(UnicornControlPanelRequestPipelineArgs args) { return(new StreamingEncodedLogResponse(Process)); }
protected override IResponse CreateResponse(UnicornControlPanelRequestPipelineArgs args) { return(new PlainTextResponse(string.Join(",", UnicornConfigurationManager.Configurations.Select(config => config.Name)))); }