Publishing your Radsystems Project

This error has to do with the API link used, it is wrong from what can see on the browser console error. You are accessing the frontend from this link https://requiomarket.my.id which is correct, and the frontend is trying to communicate with the API on the same link https://requiomarket.my.id/api/auth/login which is not correct.

There are 2 ways to set up your frontend and API.

  1. Main domain and subdomain: The frontend will be on the main domain and API will be on the subdomain. You cannot put both on two different domains or subdomains, you will get the cors error. This method was used in the tutorial above.
Frontend: https://requiomarket.my.id/
API: https://backend.requiomarket.my.id/api/
  1. Folder path: In this case, you choose to use a domain for both frontend and API or a subdomain for both frontend and API.
Frontend: https://requiomarket.my.id/
API: https://requiomarket.my.id/public/api/

Note: When using HTTPS for the frontend HTTPS must be used for the backend link, and both SSL on this link must be valid. And if you use HTTP for the frontend, HTTP must be used on the backend.

If you still don’t get it, try rewatching the video again.

1 Like