Exemple #1
0
        public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
        {
            // [Important] The order of middleware very important for request and response handle!
            // Don't mad it !!!

            // [SystemConfigs]
            SystemConfigs.Middleware(app, loggerFactory);

            // Migrate Database
            app.DatabaseMigrate();

            // [Response] Information
            ProcessingTimeMiddleware.Middleware(app);
            SystemInfoMiddleware.Middleware(app);

            // [Cros] Policy
            Cros.Middleware(app);

            // [Log] Serilog
            Log.Middleware(app, loggerFactory);

            // [Exception]
            Exception.Middleware(app);

            // [Security] Identity Server
            IdentityServer.Middleware(app);

            // [Document API] Swagger
            Swagger.Middleware(app);

            // [Background Job] Hangfire
            Hangfire.Middleware(app);

            // [Mini Response] WebMarkup
            WebMarkupMin.Middleware(app);

            // [MVC] Keep In Last
            Mvc.Middleware(app);
        }