How to track the full request redirect chain in Liquid?

Hello,

I’ve currently setup my new store to have a primary URL (i.e. xyz.com) and have also set up a new (non-primary) domain for it (i.e. abc.com).

When routing to abc.com, it redirects to xyz.com. Is there a way in liquid/shopify to get the full request redirect chain? i.e. In my Chrome Network tab, i see that a request to abc.com, “301s” to xyz.com but there’s no info on the xyz.com network call to determine what the redirect URL was.

How do we get this info? (the original origin - before redirect)

Any input is appreciated :slightly_smiling_face:

Edit: I’ve used request.host and request.origin to get the primary domain already (i.e. xyz.com) but that does not cover the redirected domain.

Source: https://shopify.dev/api/liquid/objects/request