I've configured NGINX to handle incoming requests in a specific way. Requests to search and category pages are directed to a separate backend setup, while all other pages are intended to be served by Shopify itself.
I have successfully managed the entire flow, from adding items to the cart to reaching the checkout process, using my custom domain.
However, I encountered an issue with Shopify's automatic redirection to the thank you page. Instead of using my custom domain, Shopify redirects to a thank you page with their generated store name that includes the 'myshopify' domain. The page displayed is not valid.
Interestingly, if I manually change the 'myshopify' domain to our custom domain in the URL and refresh the page, it loads the proper thank you page as desired. I've spent several days experimenting with different configurations, but I haven't found a solution.
I would greatly appreciate it if someone could provide guidance on resolving this issue.