From d6ea69218e113f9d657651782ae3160bae67efb9 Mon Sep 17 00:00:00 2001 From: Dovydas Navickas Date: Fri, 16 Aug 2024 03:49:11 +0300 Subject: [PATCH 1/2] Changed Zirku.Client2 ports to match the ones in the server. Added default redirect to index.html. --- samples/Zirku/Zirku.Client2/Program.cs | 8 +++++++- .../Zirku/Zirku.Client2/Properties/launchSettings.json | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/samples/Zirku/Zirku.Client2/Program.cs b/samples/Zirku/Zirku.Client2/Program.cs index a6b5a176f..4b7af9d45 100644 --- a/samples/Zirku/Zirku.Client2/Program.cs +++ b/samples/Zirku/Zirku.Client2/Program.cs @@ -1,4 +1,10 @@ var builder = WebApplication.CreateBuilder(args); + var app = builder.Build(); + app.UseStaticFiles(); -app.Run(); \ No newline at end of file + +// Default redirect to the index page +app.MapGet("/", () => Results.Redirect("/index.html")); + +app.Run(); diff --git a/samples/Zirku/Zirku.Client2/Properties/launchSettings.json b/samples/Zirku/Zirku.Client2/Properties/launchSettings.json index 59de28288..e674bf1e6 100644 --- a/samples/Zirku/Zirku.Client2/Properties/launchSettings.json +++ b/samples/Zirku/Zirku.Client2/Properties/launchSettings.json @@ -3,7 +3,7 @@ "windowsAuthentication": false, "anonymousAuthentication": true, "iisExpress": { - "applicationUrl": "http://localhost:12345/" + "applicationUrl": "http://localhost:5112/" } }, @@ -11,7 +11,7 @@ "Kestrel": { "commandName": "Project", "launchBrowser": true, - "applicationUrl": "http://localhost:12345/", + "applicationUrl": "http://localhost:5112/", "environmentVariables": { "ASPNETCORE_ENVIRONMENT": "Development" } From bde647f5f2aeb1b01f07816e69eaa8c901e3c265 Mon Sep 17 00:00:00 2001 From: Dovydas Navickas Date: Fri, 16 Aug 2024 04:40:23 +0300 Subject: [PATCH 2/2] Change the redirect to index.html in Zirku.Client2 to app.UseDefaultFiles(); --- samples/Zirku/Zirku.Client2/Program.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/samples/Zirku/Zirku.Client2/Program.cs b/samples/Zirku/Zirku.Client2/Program.cs index 4b7af9d45..2f00e6c9c 100644 --- a/samples/Zirku/Zirku.Client2/Program.cs +++ b/samples/Zirku/Zirku.Client2/Program.cs @@ -2,9 +2,7 @@ var app = builder.Build(); +app.UseDefaultFiles(); app.UseStaticFiles(); -// Default redirect to the index page -app.MapGet("/", () => Results.Redirect("/index.html")); - app.Run();