Adds X-Storefront request header for App Store Storefront (#3405)

### Motivation

Allow backend to determine Storefront of customer

### Description

- Adds `X-Storefront` as a default header
- Uses `StoreKit 1` implementation since its not `async`
- `StoreKit 2` implementation is `async` and would require a some
restructuring that we don't need right now

---------

Co-authored-by: NachoSoto <ignaciosoto90@gmail.com>
This commit is contained in:
Josh HoltzandNachoSoto authored and GitHub committed 2023-11-14 14:04:07 -08:00
1 parent d3866a28e4
commit 7d78633fd8
6 files changed
+68 -2

No files matched your search

@@ -225,6 +225,10 @@ private extension HTTPClient {
"X-Is-Sandbox": "\(self.systemInfo.isSandbox)"
]
if let storefront = self.systemInfo.storefront {
headers["X-Storefront"] = storefront.countryCode
}
if let platformFlavorVersion = self.systemInfo.platformFlavorVersion {
headers["X-Platform-Flavor-Version"] = platformFlavorVersion
}