I've implemented a custom pipeline in HttpRequestProcessed. When doing the usual 'bail as soon as possible' setup, I'm checking the following:

if (Sitecore.Context.Site == null || 
    !Sitecore.Context.PageMode.IsNormal ||
    Sitecore.Context.Site.Name != "my-site")

Its a pipeline that should only run on the website front-end. When testing the back-end I noticed several Sitecore apps such as the List Manager were a lot slower or not loading at all completely.

And while debugging, I saw that all calls to SPEAK resources continue in my pipeline. Which means that the Site.Context is set, and the Site.Name also matches.

Example: http://my-site.local/-/speak/v1/assets/main.js

Anyone has a clue why this could be happening?

  • 1
    Might be by design, but I would exclude more requests in your pipeline ;) Start with everything that ends with .js and .css ..
    – Gatogordo
    Mar 26 '19 at 11:01

Looking at site definitions in vanilla Sitecore, none of them work for ~/speak/v1 virtual folders or just /. That's why your site may be matched as the first one.

If you don't want to run your processor for non-item requests best check

Sitecore.Context.Item?.Visualization?.Layout != null

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.