@shopify/hydrogen 0.13.1 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.13.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1013](https://github.com/Shopify/hydrogen/pull/1013) [`94dc94ae`](https://github.com/Shopify/hydrogen/commit/94dc94aeb9dfd5e0120cab610203fdb4f0c61d3c) Thanks [@jplhomer](https://github.com/jplhomer)! - Fix CORS issue in StackBlitz
|
|
8
|
+
|
|
3
9
|
## 0.13.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -101,6 +101,10 @@ function useCreateShopRequest(body, locale) {
|
|
|
101
101
|
? (_a = Oxygen === null || Oxygen === void 0 ? void 0 : Oxygen.env) === null || _a === void 0 ? void 0 : _a.SHOPIFY_STOREFRONT_API_SECRET_TOKEN
|
|
102
102
|
: null;
|
|
103
103
|
const buyerIp = request.getBuyerIp();
|
|
104
|
+
const extraHeaders = {};
|
|
105
|
+
if (buyerIp) {
|
|
106
|
+
extraHeaders['Shopify-Storefront-Buyer-IP'] = buyerIp;
|
|
107
|
+
}
|
|
104
108
|
return {
|
|
105
109
|
key: [storeDomain, storefrontApiVersion, body, locale],
|
|
106
110
|
url: `https://${storeDomain}/api/${storefrontApiVersion}/graphql.json`,
|
|
@@ -109,11 +113,11 @@ function useCreateShopRequest(body, locale) {
|
|
|
109
113
|
method: 'POST',
|
|
110
114
|
headers: {
|
|
111
115
|
'X-Shopify-Storefront-Access-Token': secretToken !== null && secretToken !== void 0 ? secretToken : storefrontToken,
|
|
112
|
-
'Shopify-Storefront-Buyer-IP': buyerIp !== null && buyerIp !== void 0 ? buyerIp : '',
|
|
113
116
|
'X-SDK-Variant': 'hydrogen',
|
|
114
117
|
'X-SDK-Version': storefrontApiVersion,
|
|
115
118
|
'content-type': 'application/json',
|
|
116
119
|
'Accept-Language': (_b = locale) !== null && _b !== void 0 ? _b : defaultLocale,
|
|
120
|
+
...extraHeaders,
|
|
117
121
|
},
|
|
118
122
|
},
|
|
119
123
|
};
|
package/dist/esnext/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "0.13.
|
|
1
|
+
export declare const LIB_VERSION = "0.13.2";
|
package/dist/esnext/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const LIB_VERSION = '0.13.
|
|
1
|
+
export const LIB_VERSION = '0.13.2';
|
package/dist/node/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const LIB_VERSION = "0.13.
|
|
1
|
+
export declare const LIB_VERSION = "0.13.2";
|
package/dist/node/version.js
CHANGED