add angular 2

This commit is contained in:
chsakell
2016-09-26 10:49:50 +03:00
parent 05c81a3cb9
commit 53e0dd8685
10 changed files with 261 additions and 2 deletions

View File

@@ -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",