Browse Source

Introduce IgnoredUrlSuffixesInControllerNames

pull/17626/head
Halil İbrahim Kalkan 3 years ago
parent
commit
4cc49dffa7
  1. 2
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpConventionalControllerOptions.cs
  2. 2
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/ConventionalRouteBuilder.cs

2
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpConventionalControllerOptions.cs

@ -20,6 +20,8 @@ public class AbpConventionalControllerOptions
/// </summary> /// </summary>
public bool UseV3UrlStyle { get; set; } public bool UseV3UrlStyle { get; set; }
public string[] IgnoredUrlSuffixesInControllerNames { get; set; } = new[] { "Integration" };
public AbpConventionalControllerOptions() public AbpConventionalControllerOptions()
{ {
ConventionalControllerSettings = new ConventionalControllerSettingList(); ConventionalControllerSettings = new ConventionalControllerSettingList();

2
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/ConventionalRouteBuilder.cs

@ -109,7 +109,7 @@ public class ConventionalRouteBuilder : IConventionalRouteBuilder, ITransientDep
{ {
if (configuration?.UrlControllerNameNormalizer == null) if (configuration?.UrlControllerNameNormalizer == null)
{ {
return controllerName; return controllerName.RemovePostFix(Options.IgnoredUrlSuffixesInControllerNames);
} }
return configuration.UrlControllerNameNormalizer( return configuration.UrlControllerNameNormalizer(

Loading…
Cancel
Save