Unable access model.json through react app
I am able to get the data in postman when try to access model.json through react app I am getting an cors error and network error. Does anyone faced this before and have solution kindly share it
I am able to get the data in postman when try to access model.json through react app I am getting an cors error and network error. Does anyone faced this before and have solution kindly share it
Hi @rengan76 Hitting any API through Postman won't give you any CORS error. Since there is a difference between the domain of your React App and model.json used in AEM, triggers into a CORS error. You would have to set Cross-Origin Resource Sharing (CORS) configuration in AEM
The CORS configuration must specify a trusted website origin alloworigin or alloworiginregexp for which access must be granted.

Kindly refer to the below links that will help you to understand the CORS error and how to resolve it :-
Hope this helps.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.