Browse Source

Removed api-definition endpoint from gateways

ipaddr
Halil İbrahim Kalkan 5 years ago
parent
commit
0304c86fbd
  1. 2
      apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj
  2. 5
      gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs
  3. 5
      gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs

2
apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj

@ -28,8 +28,6 @@
<ProjectReference Include="..\..\..\..\services\basket\src\EShopOnAbp.BasketService.HttpApi.Client\EShopOnAbp.BasketService.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\..\services\payment\src\EShopOnAbp.PaymentService.HttpApi.Client\EShopOnAbp.PaymentService.HttpApi.Client.csproj" />
<ProjectReference Include="..\..\..\..\services\ordering\src\EShopOnAbp.OrderingService.HttpApi.Client\EShopOnAbp.OrderingService.HttpApi.Client.csproj" />
<!-- <ProjectReference Include="..\..\..\..\services\product\src\MyCompanyName.MyProjectName.ProductService.HttpApi.Client\MyCompanyName.MyProjectName.ProductService.HttpApi.Client.csproj" />-->
</ItemGroup>
<ItemGroup>

5
gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs

@ -38,6 +38,7 @@ namespace EShopOnAbp.WebPublicGateway
}
app.UseCorrelationId();
app.UseAbpSerilogEnrichers();
app.UseSwagger();
app.UseSwaggerUI(options =>
{
@ -66,10 +67,8 @@ namespace EShopOnAbp.WebPublicGateway
// options.OAuthClientSecret("1q2w3e*");
}
});
app.UseAbpSerilogEnrichers();
app.MapWhen(
ctx => ctx.Request.Path.ToString().StartsWith("/api/abp/api-definition") ||
ctx.Request.Path.ToString().TrimEnd('/').Equals(""),
ctx => ctx.Request.Path.ToString().TrimEnd('/').Equals(""),
app2 =>
{
app2.UseRouting();

5
gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs

@ -57,6 +57,7 @@ namespace EShopOnAbp.WebGateway
}
app.UseCorrelationId();
app.UseAbpSerilogEnrichers();
app.UseCors();
app.UseSwagger();
app.UseSwaggerUI(options =>
@ -82,10 +83,8 @@ namespace EShopOnAbp.WebGateway
options.OAuthClientSecret(configuration["AuthServer:SwaggerClientSecret"]);
}
});
app.UseAbpSerilogEnrichers();
app.MapWhen(
ctx => ctx.Request.Path.ToString().StartsWith("/api/abp/api-definition") ||
ctx.Request.Path.ToString().TrimEnd('/').Equals(""),
ctx => ctx.Request.Path.ToString().TrimEnd('/').Equals(""),
app2 =>
{
app2.UseRouting();

Loading…
Cancel
Save