-
I'm using the hello world template for my store and when I run in dev mode it keeps showing the following warning:
What is the recommended way to solve this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi! You can pass the const {storefront} = createStorefrontClient({
cache,
waitUntil,
// ...
storefrontHeaders: {buyerIp: '...'},
}); You would normally get that IP from the Request object. If you are deploying to Oxygen, you can get this by using the import {
createRequestHandler,
getStorefrontHeaders,
} from '@shopify/remix-oxygen';
// ...
const {storefront} = createStorefrontClient({
cache,
waitUntil,
// ...
storefrontHeaders: getStorefrontHeaders(request),
}); We'll update our docs to reflect this better 👍 If you already have that code and still seeing this in dev, please ignore it for now. |
Beta Was this translation helpful? Give feedback.
-
Thanks. Yep, I already have this code and I still see the warning in dev. Nice to know that I can ignore it for now :). |
Beta Was this translation helpful? Give feedback.
Hi! You can pass the
buyerIp
when creating the storefront client in yourserver.js
/server.ts
file:You would normally get that IP from the Request object. If you are deploying to Oxygen, you can get this by using the
getStorefrontHeaders
function:We'll update our docs to r…