From 75cd096b608b2ae3d275ddfb13bb3ab374df0b8a Mon Sep 17 00:00:00 2001 From: KarlsEcho <1059017311@qq.com> Date: Sun, 26 Oct 2025 15:25:45 +0800 Subject: [PATCH] =?UTF-8?q?upd=EF=BC=9A=E5=88=9A=E5=88=9A=E5=A5=BD?= =?UTF-8?q?=E5=83=8F=E6=B2=A1=E5=8A=A0=E5=AE=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gateways/KonSoft.InternalGateway/Program.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gateways/KonSoft.InternalGateway/Program.cs b/gateways/KonSoft.InternalGateway/Program.cs index 47d1d38..3701eee 100644 --- a/gateways/KonSoft.InternalGateway/Program.cs +++ b/gateways/KonSoft.InternalGateway/Program.cs @@ -1,6 +1,7 @@ using KonSoft.InternalGateway; using KonSoft.InternalGateway.Extensions; using KonSoft.Shared.Hosting.AspNetCore; +using Microsoft.AspNetCore.Rewrite; using Serilog; var assemblyName = typeof(Program).Assembly.GetName().Name!; @@ -20,12 +21,14 @@ try .UseSerilog(); builder.Services.AddReverseProxy() .LoadFromConfig(builder.Configuration.GetSection("ReverseProxy")); + builder.Services.AddControllers(); await builder.AddApplicationAsync(); var app = builder.Build(); await app.InitializeApplicationAsync(); app.MapReverseProxy(); app.MapGet("/heath", () => "Online"); app.UseSwaggerUIWithYarp(); + app.UseRewriter(new RewriteOptions().AddRedirect("^(|\\|\\s+)$", "/swagger")); await app.RunAsync(); return 0;