From 0304c86fbdd3687f4240903dc1fcb470525a1990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Mon, 24 Jan 2022 17:31:45 +0300 Subject: [PATCH] Removed api-definition endpoint from gateways --- .../src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj | 2 -- .../EShopOnAbpWebPublicGatewayModule.cs | 5 ++--- .../src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs | 5 ++--- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj index 5effde24..a9c12dc4 100644 --- a/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj +++ b/apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj @@ -28,8 +28,6 @@ - - diff --git a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs b/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs index 86d0fb5d..95ca4f5c 100644 --- a/gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbpWebPublicGatewayModule.cs +++ b/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(); diff --git a/gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs b/gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs index b7b2ee1f..b933506b 100644 --- a/gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbpWebGatewayModule.cs +++ b/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();