public void Configure( IApplicationBuilder app, IHostingEnvironment env, NotificationsHandler notifications, NeoConfig neoConfig) { neoConfig.Init(); notifications.Init(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); app.UseDatabaseErrorPage(); } else { app.UseExceptionHandler("/Error"); app.UseHsts(); } app.UseCors(builder => builder .WithOrigins("http://localhost:8111", "http://localhost:4200") .AllowAnyMethod() .AllowAnyHeader() .AllowCredentials()); app.UseStaticFiles(); app.UseCookiePolicy(); app.UseSignalR(routes => { routes.MapHub <ValuesHub>("/hubs/values"); routes.MapHub <GameHub>("/hubs/game"); }); app.UseAuthentication(); app.UseMvc(); }