diff --git a/.gitignore b/.gitignore index ed428c1..09b81b2 100644 --- a/.gitignore +++ b/.gitignore @@ -186,6 +186,8 @@ typings/ wwwroot/lib/ app/**/*.js app/**/*.map +wwwroot/app/**/*.* + orleans.codegen.cs # RIA/Silverlight projects diff --git a/Startup.cs b/Startup.cs index c1cac8e..478c186 100644 --- a/Startup.cs +++ b/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", diff --git a/Views/Home/Index.cshtml b/Views/Home/Index.cshtml index d569ec2..055727c 100644 --- a/Views/Home/Index.cshtml +++ b/Views/Home/Index.cshtml @@ -3,8 +3,27 @@
+ + + + + + + + + + + + + + + + + -