mirror of
https://github.com/chsakell/aspnet-core-signalr-angular.git
synced 2025-12-22 17:27:48 +00:00
add angular 2
This commit is contained in:
17
Startup.cs
17
Startup.cs
@@ -39,7 +39,22 @@ namespace LiveGameFeed
|
||||
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
|
||||
loggerFactory.AddDebug();
|
||||
|
||||
app.UseMvc(routes =>
|
||||
app.UseCors(
|
||||
builder => builder.AllowAnyOrigin()
|
||||
.AllowAnyHeader()
|
||||
.AllowAnyMethod()
|
||||
.AllowCredentials())
|
||||
.UseStaticFiles()
|
||||
.UseWebSockets();
|
||||
/*
|
||||
.Map("/xhrf", a => a.Run(async context =>
|
||||
{
|
||||
var tokens = antiforgery.GetAndStoreTokens(context);
|
||||
context.Response.Cookies.Append("XSRF-TOKEN", tokens.RequestToken, new CookieOptions() { HttpOnly = false });
|
||||
await context.Response.WriteAsync(tokens.RequestToken);
|
||||
}));
|
||||
*/
|
||||
app.UseMvc(routes =>
|
||||
{
|
||||
routes.MapRoute(
|
||||
name: "default",
|
||||
|
||||
Reference in New Issue
Block a user