Compare commits

...
Author SHA1 Message Date
Claus 2a0c4100fa Removing the MiniProfiler routes if solution is not in debug mode. 2019-11-20 12:21:41 +01:00
4 changed files with 23 additions and 6 deletions
+2 -2
View File
@@ -11,5 +11,5 @@ using System.Resources;
[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("7.13.2")]
[assembly: AssemblyInformationalVersion("7.13.2")]
[assembly: AssemblyFileVersion("7.13.3")]
[assembly: AssemblyInformationalVersion("7.13.3")]
@@ -6,7 +6,7 @@ namespace Umbraco.Core.Configuration
{
public class UmbracoVersion
{
private static readonly Version Version = new Version("7.13.2");
private static readonly Version Version = new Version("7.13.3");
/// <summary>
/// Gets the current version of Umbraco.
+2 -2
View File
@@ -1038,9 +1038,9 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.1\x86\*.* "$(TargetDir)x86\"
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>7132</DevelopmentServerPort>
<DevelopmentServerPort>7133</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:7132</IISUrl>
<IISUrl>http://localhost:7133</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
@@ -1,7 +1,10 @@
using System;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.Routing;
using StackExchange.Profiling;
using Umbraco.Core.Configuration;
namespace Umbraco.Web.Profiling
{
@@ -24,6 +27,20 @@ namespace Umbraco.Web.Profiling
{
// booting...
_bootPhase = BootPhase.Boot;
// Remove Mini Profiler routes when not in debug mode
if (GlobalSettings.DebugMode == false)
{
//NOTE: Keep the global fully qualified name, for some reason without it I was getting null refs
var prefix = global::StackExchange.Profiling.MiniProfiler.Settings.RouteBasePath.Replace("~/", string.Empty);
using (RouteTable.Routes.GetWriteLock())
{
var routes = RouteTable.Routes.Where(x => x is Route r && r.Url.StartsWith(prefix)).ToList();
foreach(var r in routes)
RouteTable.Routes.Remove(r);
}
}
}
/// <summary>
@@ -118,4 +135,4 @@ namespace Umbraco.Web.Profiling
}
}
}
}
}