diff --git a/src/Aiursoft.ChessServer/Middlewares/AllowCrossOriginMiddleware.cs b/src/Aiursoft.ChessServer/Middlewares/AllowCrossOriginMiddleware.cs index 031db18..c16be5c 100644 --- a/src/Aiursoft.ChessServer/Middlewares/AllowCrossOriginMiddleware.cs +++ b/src/Aiursoft.ChessServer/Middlewares/AllowCrossOriginMiddleware.cs @@ -11,6 +11,11 @@ public async Task Invoke(HttpContext context) { + if (context.Request.Path.ToString().StartsWith("/games/img")) + { + context.Request.Path = context.Request.Path.ToString().Substring("/games".Length); + } + var origin = context.Request.Headers["Origin"].ToString(); if (string.IsNullOrEmpty(origin)) { diff --git a/src/Aiursoft.ChessServer/Views/Games/GetHtml.cshtml b/src/Aiursoft.ChessServer/Views/Games/GetHtml.cshtml index 6f703d1..5acb91f 100644 --- a/src/Aiursoft.ChessServer/Views/Games/GetHtml.cshtml +++ b/src/Aiursoft.ChessServer/Views/Games/GetHtml.cshtml @@ -1,7 +1,7 @@ @model int @section Styles { - + } -@* Make a responsible board based on bootstrap: (Avoid width with hardcode or overflow) *@ -@*
*@ -