Exemplo n.º 1
0
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            app.UseCors("CorsPolicy");
            if (env.IsDevelopment()) //Is Development mode
            {
                Swagger.StartUpSwaggerConfigure(app);
                app.UseDeveloperExceptionPage();
            }
            else if (env.IsProduction()) //Is Production mode
            {
                app.UseHsts();
            }
            else if (env.IsStaging()) //Is Staging mode
            {
                app.UseHsts();
            }
            app.UseAuthentication();


            DefaultFiles.DefaultFilesConfigure(app, env);
            SignalRMapHub.SignalRMapHubConfigure(app);

            app.UseHttpsRedirection();
            app.UseMvc();
        }