How the Umbraco inbound request pipeline works
The inbound process is triggered by UmbracoRouteValueTransformer
and then handled with the Published router. The published content request preparation process kicks in and creates a PublishedRequestBuilder
which will be used to create a PublishedContentRequest
.
The PublishedContentRequest
object represents the request which Umbraco must handle. It contains everything that will be needed to render it. All this occurs when the Umbraco modules knows that an incoming request maps to a document that can be rendered.
There are 3 important properties, which contains all the information to find a node:
Domain is a DomainAndUri object that is a standard Domain plus the fully qualified uri. For example, the Domain may contain "example.com" whereas the Uri will be fully qualified for example "https://example.com/".
It contains the content to render:
Contains template information:
The published request is created using the PublishedRequestBuilder
, which implements IPublishedRequestBuilder
. It's only in this builder that it's possible to set values, such as domain, culture, published content, redirects, and so on.
You can subscribe to the 'routing request' notification, which is published right after the PublishedRequestBuilder
has been prepared, but before the request is built, and processed. Here you can modify anything in the request before it is built and processed! For example content, template, etc: