deco-cx / apps

App definitions by deco.cx
Apache License 2.0
82 stars 85 forks source link

feat(shopify): adding public Url to be proxied on shopify #910

Closed yuriassuncx closed 1 month ago

yuriassuncx commented 1 month ago

What is this Contribution About?

Addition of publicUrl in Shopify Proxy Loader

This PR implements the addition of a new property, publicUrl, to the Shopify proxy loader. The goal is to prevent issues with registered domains that have redirects, ensuring that the correct URLs are used during requests and avoiding bugs related to proxies.

Changes Made

const urlToUse = publicUrl ? 
  new URL(publicUrl.startsWith("http") ? publicUrl : `https://${publicUrl}`) :
  new URL(`https://${storeName}.myshopify.com`);

Documentation

/**
 * @title Public store URL
 * @description Domain that is registered on License Manager (e.g: www.mystore.com.br)
 */
publicUrl?: string;

Final Considerations

This change enhances the robustness of the proxy system, ensuring that redirects are handled correctly and preventing potential navigation errors for users.

github-actions[bot] commented 1 month ago

Tagging Options

Should a new tag be published when this PR is merged?