Skip to content

Instantly share code, notes, and snippets.

@steliodibello
Created November 23, 2023 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save steliodibello/51566ecd3e74e9ed9d8b0636ccb8ba1d to your computer and use it in GitHub Desktop.
Save steliodibello/51566ecd3e74e9ed9d8b0636ccb8ba1d to your computer and use it in GitHub Desktop.
SitecoreLayoutRequest sitecoreLayoutRequest = _requestMapper.Map(httpContext.Request);
string cookieValueFromContext = _httpContextAccessor.HttpContext.Request.Cookies["_XXXX_trk"];
if (!string.IsNullOrEmpty(cookieValueFromContext))
{
sitecoreLayoutRequest.AddHeader("XXXX", new string[] { cookieValueFromContext });
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment