diff --git a/GC-local-server-rewrite/server/Server.cs b/GC-local-server-rewrite/server/Server.cs index 160c8c3..1f652fc 100644 --- a/GC-local-server-rewrite/server/Server.cs +++ b/GC-local-server-rewrite/server/Server.cs @@ -43,12 +43,18 @@ public class Server module => module.WithController()) .WithStaticFolder(Configs.STATIC_BASE_ROUTE, PathHelper.HtmlRootPath, true, m => m .WithContentCaching(Configs.USE_FILE_CACHE)) - // Add static files after other modules to avoid conflicts .WithStaticFolder("/", PathHelper.HtmlRootPath, true, m => m .WithContentCaching(Configs.USE_FILE_CACHE)) .WithModule(new ActionModule("/", HttpVerbs.Any, ctx => ctx.SendDataAsync(new { Message = "Error" }))); + server.AddCustomMimeType(".dll", "application/octet-stream"); + server.AddCustomMimeType(".blat", "application/octet-stream"); + server.AddCustomMimeType(".dat", "application/octet-stream"); + server.AddCustomMimeType(".json", "application/json"); + server.AddCustomMimeType(".wasm", "application/wasm"); + server.AddCustomMimeType(".woff", "application/font-woff"); + server.AddCustomMimeType(".woff2", "application/font-woff2"); server.HandleHttpException(async (context, exception) => { context.Response.StatusCode = exception.StatusCode; @@ -57,9 +63,11 @@ public class Server { case 404: await context.SendStringAsync("404 NOT FOUND!", "text/html", new UTF8Encoding(false)); + break; default: await HttpExceptionHandler.Default(context, exception); + break; } }); diff --git a/MudAdmin/MudAdmin.csproj b/MudAdmin/MudAdmin.csproj index 8161d5f..55f89f4 100644 --- a/MudAdmin/MudAdmin.csproj +++ b/MudAdmin/MudAdmin.csproj @@ -30,6 +30,10 @@ PreserveNewest true + + PreserveNewest + true + diff --git a/MudAdmin/Pages/Counter.razor b/MudAdmin/Pages/Counter.razor deleted file mode 100644 index cf7aaff..0000000 --- a/MudAdmin/Pages/Counter.razor +++ /dev/null @@ -1,18 +0,0 @@ -@page "/counter" - -Counter - -Counter -Current count: @currentCount -Click me - - -@code { - private int currentCount = 0; - - private void IncrementCount() - { - currentCount++; - } - -} \ No newline at end of file diff --git a/MudAdmin/Pages/Index.razor b/MudAdmin/Pages/Index.razor index 62270c4..f416456 100644 --- a/MudAdmin/Pages/Index.razor +++ b/MudAdmin/Pages/Index.razor @@ -2,11 +2,5 @@ Index -Hello, world! -Welcome to your new app, powered by MudBlazor! - - You can find documentation and examples on our website here: - - www.mudblazor.com - - \ No newline at end of file +Admin page for GC local server +Powered by MudBlazor \ No newline at end of file diff --git a/MudAdmin/Shared/MainLayout.razor b/MudAdmin/Shared/MainLayout.razor index 7d9b80b..f882806 100644 --- a/MudAdmin/Shared/MainLayout.razor +++ b/MudAdmin/Shared/MainLayout.razor @@ -9,11 +9,11 @@ - + - MudAdmin + GC local server Admin diff --git a/MudAdmin/Shared/NavMenu.razor b/MudAdmin/Shared/NavMenu.razor index 9b23ec3..246001d 100644 --- a/MudAdmin/Shared/NavMenu.razor +++ b/MudAdmin/Shared/NavMenu.razor @@ -1,5 +1,4 @@  Home - Counter Users \ No newline at end of file diff --git a/MudAdmin/wwwroot/news.png b/MudAdmin/wwwroot/news.png new file mode 100644 index 0000000..f720859 Binary files /dev/null and b/MudAdmin/wwwroot/news.png differ diff --git a/MudAdmin/wwwroot/sample-data/weather.json b/MudAdmin/wwwroot/sample-data/weather.json deleted file mode 100644 index 06463c0..0000000 --- a/MudAdmin/wwwroot/sample-data/weather.json +++ /dev/null @@ -1,27 +0,0 @@ -[ - { - "date": "2018-05-06", - "temperatureC": 1, - "summary": "Freezing" - }, - { - "date": "2018-05-07", - "temperatureC": 14, - "summary": "Bracing" - }, - { - "date": "2018-05-08", - "temperatureC": -13, - "summary": "Freezing" - }, - { - "date": "2018-05-09", - "temperatureC": -16, - "summary": "Balmy" - }, - { - "date": "2018-05-10", - "temperatureC": -2, - "summary": "Chilly" - } -]