A space to discuss online store customization, theme development, and Liquid templating.
Hi,
I am trying to write to a metafield on the order from the checkout page. I have shopify plus, and an existing custom app that handles the api requests. The api handling was built using this as reference: https://github.com/Shopify/shopify-app-examples/tree/main/qr-code/node
The issue that I am facing is that the app does not handle proxy requests correctly. I get the following error: InvalidRequestError: Request does not contain a host query parameter
This is ran through the proxy from Shopify side, and has worked for other requests from theme.liquid. Here is how I am handling proxy requests from express.js:
if (Shopify.Context.IS_EMBEDDED_APP && req.query.embedded !== "1" ) { try{ const embeddedUrl = Shopify.Utils.getEmbeddedAppUrl(req); return res.redirect(embeddedUrl + req.path); }catch (error){ console.log(error); } }
I also opened a github issue: https://github.com/Shopify/shopify-api-node/issues/609
Let me know if there's any other info that would help resolve this.