mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.9 KiB
61 lines
1.9 KiB
// ==========================================================================
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex UG (haftungsbeschränkt)
|
|
// All rights reserved. Licensed under the MIT license.
|
|
// ==========================================================================
|
|
|
|
using Ben.Diagnostics;
|
|
using Microsoft.AspNetCore.Builder;
|
|
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Squidex.Areas.Api;
|
|
using Squidex.Areas.Frontend;
|
|
using Squidex.Areas.IdentityServer;
|
|
using Squidex.Areas.OrleansDashboard;
|
|
using Squidex.Areas.Portal;
|
|
using Squidex.Config.Domain;
|
|
using Squidex.Config.Orleans;
|
|
using Squidex.Config.Web;
|
|
|
|
namespace Squidex
|
|
{
|
|
public sealed class WebStartup
|
|
{
|
|
private readonly IConfiguration configuration;
|
|
|
|
public WebStartup(IConfiguration configuration)
|
|
{
|
|
this.configuration = configuration;
|
|
}
|
|
|
|
public void ConfigureServices(IServiceCollection services)
|
|
{
|
|
services.AddOrleansSilo();
|
|
services.AddAppServices(configuration);
|
|
|
|
services.AddHostedService<SystemExtensions.InitializeHostedService>();
|
|
services.AddHostedService<SystemExtensions.MigratorHostedService>();
|
|
}
|
|
|
|
public void Configure(IApplicationBuilder app)
|
|
{
|
|
app.ApplicationServices.LogConfiguration();
|
|
|
|
app.UseBlockingDetection();
|
|
|
|
app.UseMyHealthCheck();
|
|
app.UseMyRobotsTxt();
|
|
app.UseMyTracking();
|
|
app.UseMyLocalCache();
|
|
app.UseMyCors();
|
|
app.UseMyForwardingRules();
|
|
|
|
app.ConfigureApi();
|
|
app.ConfigurePortal();
|
|
app.ConfigureOrleansDashboard();
|
|
app.ConfigureIdentityServer();
|
|
app.ConfigureFrontend();
|
|
}
|
|
}
|
|
}
|
|
|