I need to determine whether the current Magento request is intended for a frontend display or a backend admin area. I am performing this check within an observer and I have the request object available. I previously considered using the method below:
app()->getSingleton('manage/session')->retrieveCurrentUser();
However, I’m not convinced that this is the most reliable approach. Is there an alternative method that can more clearly distinguish between frontend and backend requests?