Questions and discussions about using the Shopify CLI and Shopify-built libraries.
Hello
In the old CLI version, We are calling the proxy route from the theme app extension via Ajax call, and in the web/index.js file we have created route logic for that proxy route.
Now in the new Remix CLI app, In which file we can create proxy route logic, and how to create it?
Thank you
Hi Divy_tatva,
We have documentation here on how to authenticate requests coming from Shopify app proxies, with examples of how to use the session object and communicate with the Admin API.
Hope this helps!
Liam | Developer Advocate @ 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
Hey Liam, here is my theme extension code
Did you find any solution for this?
In a Remix CLI app, you can set up a proxy route by creating a new file in the app directory called routes.ts or routes.js. In this file, you can define your proxy route logic using Remix's routing capabilities.First, import the json function from Remix:typescriptimport { json } from '@remix-run/node';Then, define your proxy route handler:typescriptexport const loader = json(async () => {// Your proxy route logic here});Next, update your remix.config.js file to include the proxy route configuration:javascriptmodule.exports = {// Other configuration optionsroutes: {'/your-proxy-route': require.resolve('./app/routes'),},};Regarding LTE proxies, they are similar to 4G proxies and provide a secure and stable connection. Using such proxies can be beneficial for various purposes, such as bypassing geo-restrictions or improving security and anonymity.