Browse Source
Merge pull request #19924 from abpframework/salihozkara/fixBlogMemberPage
Fix blog member page wrong urls
pull/19936/head
Gizem Mutu Kurt
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
6 additions and
6 deletions
-
modules/blogging/.gitignore
-
modules/blogging/src/Volo.Blogging.Web/BloggingRouteConstraint.cs
|
|
|
@ -0,0 +1,2 @@ |
|
|
|
#Libs |
|
|
|
**/wwwroot/libs/** |
|
|
|
@ -22,14 +22,12 @@ public class BloggingRouteConstraint : IRouteConstraint |
|
|
|
{ |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
var displayUrl = httpContext.Request.GetDisplayUrl(); |
|
|
|
|
|
|
|
if (BloggingUrlOptions.IgnoredPaths.Any(path => displayUrl.Contains(path, StringComparison.InvariantCultureIgnoreCase))) |
|
|
|
|
|
|
|
if (!values.TryGetValue(routeKey, out var routeValue) || routeValue is not string routeValueString) |
|
|
|
{ |
|
|
|
return false; |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
return true; |
|
|
|
return !BloggingUrlOptions.IgnoredPaths.Any(path => routeValueString.StartsWith(path, StringComparison.InvariantCultureIgnoreCase)); |
|
|
|
} |
|
|
|
} |