How to setup proxy server with Unity WebGL custom application

How to setup proxy server with Unity WebGL custom application

Marconino
Shopify Partner
6 0 2

Hi,

I've made a Unity WebGL application that will be used by clients.
For context, my application is hosted on an external domain.

I want to give my customers the possibility of creating their own customized products, so I want to make requests to the Admin API.
For security reasons and to avoid CORS problems, I understand that I need to set up a proxy server hosted by myself, and do the following:
-(Client side) Unity WebGL app sends "safe" requests (just the product information the client is creating) to the proxy server I'm hosting
-Proxy server sends the product creation request with all the information retrieved from the app, to the Shopify API.
-The Shopify API executes the request and sends the information back to the customer.


Is this the right solution?
If so, how can I ensure that my proxy server can send requests to the Shopify API without having CORS problems?

Replies 0 (0)