public void Configure(IApplicationBuilder app, IHostingEnvironment env) { if (env.IsDevelopment()) { _logger.LogInformation("In Development environment"); app.UseDeveloperExceptionPage(); } else { // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); } DALConfigurations.Configure(app, env); BLLConfigurations.Configure(app, env); app.UseCors(builder => builder .AllowAnyMethod() .AllowAnyHeader() .WithExposedHeaders("Token-Expired", "Content-Disposition") .AllowCredentials() .WithOrigins("http://localhost:4200")); app.UseHttpsRedirection(); app.UseAuthentication(); app.UseSignalR(routes => { routes.MapHub <NotificationHub>("/notification"); routes.MapHub <FileEditingHub>("/filesedit"); }); app.UseMvc(); }
public static void RegisterCustomServices(this IServiceCollection services, IConfiguration configuration) { services.AddScoped <JwtIssuerOptions>(); BLLConfigurations.ConfigureServices(services, configuration); DALConfigurations.ConfigureServices(services, configuration); RabbitMQConfigurations.ConfigureServices(services, configuration); }