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

i used your 1st way… i used sub domain called “api.requiomarket.my.id” which is my domain is “requiomarket.my.id”. but i will try with 2nd way. thanks for your response, willvin

[EDIT]: i have try again and still the problem is CORS policy
“Access to XMLHttpRequest at ‘https://backend.requiomarket.my.id/api/auth/login’ from origin ‘https://requiomarket.my.id’ has been blocked by CORS policy: Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.”

Send me a PM with your Anydesk ID.