Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
In the documentation it says that the Storefront API cannot be utilized server-side because of its rate limits. What can I do if I want to use Server Side Rendering (SSR)? And how does Hydrogen avoids this problem if it also uses SSR?
Solved! Go to the solution
This is an accepted solution.
I think I've found the answer here: https://shopify.dev/api/storefront#rate_limits
If you use a server-side library, the IP address of the request will be your server’s address. To ensure your app is throttled correctly, use a delegate access token and pass it in the Shopify-Storefront-Private-Token header from server contexts. Requests using this authentication method can pass the buyer IP into the Shopify-Storefront-Buyer-IP header.
Would love to get any answer on this question
This is an accepted solution.
I think I've found the answer here: https://shopify.dev/api/storefront#rate_limits
If you use a server-side library, the IP address of the request will be your server’s address. To ensure your app is throttled correctly, use a delegate access token and pass it in the Shopify-Storefront-Private-Token header from server contexts. Requests using this authentication method can pass the buyer IP into the Shopify-Storefront-Buyer-IP header.
I've just updated my answer because I had an error in the quote I put. The solution is in the link I mentioned in the "Usage limitations" section. I don't know how to explain it better and I haven't implemented it yet.
oh okey, i tried these too but it doesnt work for me.
Can you teach me after if it is working for you?
Would be really nice.
Has anyone gotten this to work? Seems like a lot of people (including us) are struggling with this...
Hey everyone 👋. We're now live 😀 🎊. Change log entry has been posted here with links to documentation.
John C | Developer Support @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog