diff --git a/app/routes/app._index.jsx b/app/routes/app._index.jsx index 46ca969..1b8368c 100644 --- a/app/routes/app._index.jsx +++ b/app/routes/app._index.jsx @@ -81,7 +81,15 @@ export const loader = async ({ request }) => { currencyCode: recurringPricing?.price?.currencyCode || "USD", } : null; - if (shop === "racewerksengg.myshopify.com") { + // Check server-side free-access whitelist + let hasFreeAccess = false; + try { + const far = await fetch(`https://backend.data4autos.com/free-access/${encodeURIComponent(shop)}`); + const fad = await far.json(); + hasFreeAccess = fad.allowed === true; + } catch {} + + if (hasFreeAccess) { return json({ redirectToBilling: false, shop, isSubscribed: true, subscription: subscriptionDetails, allSubscriptions: subscriptions }); }