fix 修复网关失效问题

This commit is contained in:
2025-10-22 20:56:02 +08:00
parent 6573602530
commit e79925f402
5 changed files with 23 additions and 10 deletions

View File

@ -1,5 +1,4 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"profiles": {
"http": {
"commandName": "Project",
@ -8,6 +7,18 @@
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:44322"
},
"Container (Dockerfile)": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}",
"environmentVariables": {
"ASPNETCORE_HTTPS_PORTS": "8081",
"ASPNETCORE_HTTP_PORTS": "8080"
},
"publishAllPorts": true,
"useSSL": true
}
}
},
"$schema": "http://json.schemastore.org/launchsettings.json"
}

View File

@ -1,17 +1,18 @@
using KonSoft.Shared.Hosting.Gateways;
using KonSoft.Admin;
using KonSoft.Shared.Hosting.Gateways;
using Volo.Abp;
using Volo.Abp.Modularity;
namespace KonSoft.InternalGateway
{
[DependsOn(
typeof(KonSoftSharedHostingGatewaysModule)
typeof(KonSoftSharedHostingGatewaysModule),
typeof(AdminHttpApiModule)
)]
public class InternalGatewayModule : AbpModule
{
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
}
}
}

View File

@ -10,11 +10,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.22.1" />
<PackageReference Include="Yarp.ReverseProxy" Version="2.3.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\modules\admin\src\KonSoft.Admin.HttpApi\KonSoft.Admin.HttpApi.csproj" />
<ProjectReference Include="..\..\shared\KonSoft.Shared.Hosting.Gateways\KonSoft.Shared.Hosting.Gateways.csproj" />
</ItemGroup>

View File

@ -22,6 +22,7 @@ try
await builder.AddApplicationAsync<InternalGatewayModule>();
var app = builder.Build();
await app.InitializeApplicationAsync();
app.MapReverseProxy();
await app.RunAsync();
return 0;

View File

@ -6,6 +6,10 @@
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Yarp.ReverseProxy" Version="2.3.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\KonSoft.Shared.Hosting.AspNetCore\KonSoft.Shared.Hosting.AspNetCore.csproj" />
</ItemGroup>