It depends on how you define your layers; for example, my "business logic" is usually related to a problem that I am trying to solve and does not know anything about the user interface. Therefore, it cannot redirect, since it does not have access to the request / response.
Personally, I would do it at the user interface level; working with raw interactions, such as the gatekeeper and the keeper, is part of setting the user interface level for the web application. IMO For example, through an http module, which is (by definition) a component of the UI layer.
source share