Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

update headless api to return the RoutedBranch header

Fixed in

EPiServer.ContentDeliveryApi 2.14.0

(Or a related package)

Created

Jun 11, 2020

Updated

Jun 22, 2022

State

Closed, Acceptance tests pass


Description

A delivery client will need to know which branch the request URL is mapped to. Just using the content branch will result in incorrect behavior when a fallback or replacement language is used.
We should extend the content resolving request to return this information as well.

Acceptance requirement

The client must get request branch information when the requested branch is inconsistent with the returned content
The ASP.NET Core site should use the Request branch rather that the Content branch to set the SiteContext and initialize the View localization.

Implementation notes

Getting the branch is easy when the host is mapped to a specific branch.
For unmapped hosts, we will need to call the router directly or extend the UrlResolver.Route to return additional information.