What's your biggest current challenge? Have your say in Community Polls along the right column.

Theme app extension - app proxy setup - remix

Theme app extension - app proxy setup - remix

Nitansh
Shopify Partner
5 0 0

My setup:

App proxy Subpath prefix : apps

App proxy Subpath : proxytest

 

Proxy URL: https://url.trycloudflare.com/app/proxy 

From theme app extension sending the request as : 

fetch('/apps/proxytest')
and in the remix app path is : app.proxy.jsx (app/proxy)
In the remix app I am getting the request and the session

 

const { admin, session } = await authenticate.public.appProxy(request);

if (session) {

    console.log(session);

}

const response = await admin.graphql(

       `#graphql query productTitle {

                 products(first: 1) { nodes { title } }

        }`, );

 

I am able to fetch the product also, but not able to send any response back

 

In the browser it does 307 Temporary redirect to the <store-domain>/auth/login

Replies 0 (0)