@wocart/storefront / astro / collectForwardedHeaders
Function: collectForwardedHeaders()
collectForwardedHeaders(
request):Record<string,string>
Collect the shopper's attribution headers so the server records the visitor, not the theme's worker: User-Agent verbatim, the client IP from Cloudflare's CF-Connecting-IP (falling back to the first X-Forwarded-For entry), and the Referer when present.
Parameters
request
Request
Returns
Record<string, string>