I created two web apps for frontend app(for angular) and backend(for .net core web api) in azure
When we access the API we get the following error.
- Access From Global Environment : Error: "Access to XMLHttpRequest at 'https://api.kdgtest.com/api/GoogleCalendars/GetGoogleCalenderList?viewMode=true' from origin 'https://mountainfoundation.kdgtest.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."
2) Access From Local Environment : Error: "Access to XMLHttpRequest at 'https://api.kdgtest.com/api/GoogleCalendars/GetGoogleCalenderList?viewMode=true' from origin 'http://localhost:2019' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."
Please give me a proper solution for resolved the above error. Please let me know Do we need to change the Azure app(backend) or change the backend project (using the Net Core Web API)?
Please let me know if you have any questions regarding the above error.
Thanks,
Nilesh