This project is read-only.
1
Vote

New feature for next version

description

Add new code in SiteMapUtilities.cs:
 
internal static string takeLocalRawUrl()
    {
        var local = HttpContext.Current.Request.RawUrl;
        local = HttpContext.Current.Request.Url.Authority.Contains("localhost:") ? local.Substring(local.IndexOf("/", 1, StringComparison.Ordinal)) : local;
        local = local.TrimStart(new[] { '/' });
 
        return local.ToLower();
    }
 
And set this in filter: (SiteMapManager.cs)
// If the path is forbidden, return false
        var prohibido = config.forbiddenPaths.Cast<string>().Any(fp => SubgurimSiteMapUtilities.takeLocalPath().StartsWith(SubgurimSiteMapUtilities.fixToLocalPath(fp)));
        if (prohibido) return false;
        var prohibido2 = config.forbiddenPaths.Cast<string>().Any(fp => SubgurimSiteMapUtilities.takeLocalRawUrl().StartsWith(SubgurimSiteMapUtilities.fixToLocalPath(fp)));
        if (prohibido2) return false;

comments