diff --git a/src/Umbraco.Web/UmbracoContext.cs b/src/Umbraco.Web/UmbracoContext.cs index 392eb03d64..347f79e51b 100644 --- a/src/Umbraco.Web/UmbracoContext.cs +++ b/src/Umbraco.Web/UmbracoContext.cs @@ -290,24 +290,7 @@ namespace Umbraco.Web _previewing = _previewToken.IsNullOrWhiteSpace() == false; } - - private bool? _isDocumentRequest; - - /// - /// Checks if the request is a document request (i.e. one that the module should handle) - /// - /// - /// - /// - internal bool IsDocumentRequest(RoutableDocumentFilter docLookup) - { - if (_isDocumentRequest.HasValue) - return _isDocumentRequest.Value; - - _isDocumentRequest = docLookup.IsDocumentRequest(HttpContext, OriginalRequestUrl); - return _isDocumentRequest.Value; - } - + // say we render a macro or RTE in a give 'preview' mode that might not be the 'current' one, // then due to the way it all works at the moment, the 'current' published snapshot need to be in the proper // default 'preview' mode - somehow we have to force it. and that could be recursive. diff --git a/src/Umbraco.Web/UmbracoInjectedModule.cs b/src/Umbraco.Web/UmbracoInjectedModule.cs index 75251abaeb..6dc41d39ee 100644 --- a/src/Umbraco.Web/UmbracoInjectedModule.cs +++ b/src/Umbraco.Web/UmbracoInjectedModule.cs @@ -161,7 +161,7 @@ namespace Umbraco.Web var reason = EnsureRoutableOutcome.IsRoutable; // ensure this is a document request - if (!context.IsDocumentRequest(_routableDocumentLookup)) + if (!_routableDocumentLookup.IsDocumentRequest(httpContext, context.OriginalRequestUrl)) { reason = EnsureRoutableOutcome.NotDocumentRequest; }