Skip to content

Commit

Permalink
Merge pull request #798 from andersjonsson/allow-root-as-endpoint
Browse files Browse the repository at this point in the history
trim ending slash from url when appending /$metadata or /mex to allow "/" as path.
  • Loading branch information
kotovaleksandr authored Jan 10, 2022
2 parents 96d37b5 + f84a512 commit 162f502
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SoapCore/SoapEndpointExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,8 @@ public static IEndpointConventionBuilder UseSoapEndpoint<T_MESSAGE>(this IEndpoi
.UseMiddleware<SoapEndpointMiddleware<T_MESSAGE>>(soapOptions)
.Build();

routes.Map(soapOptions.Path + "/$metadata", pipeline);
routes.Map(soapOptions.Path + "/mex", pipeline);
routes.Map(soapOptions.Path?.TrimEnd('/') + "/$metadata", pipeline);
routes.Map(soapOptions.Path?.TrimEnd('/') + "/mex", pipeline);

return routes.Map(soapOptions.Path, pipeline)
.WithDisplayName("SoapCore");
Expand Down

0 comments on commit 162f502

Please sign in to comment.