CORS issue when a 3rd party service is call by angular app

Hi everyone,

We have the following scenario: An Angular 7 web application that we want to connect to a MongoDB Realm service.

We want to get information from MongoDB by calling a 3rd party service with the “https:///api/client/v2.0/app/application-0-/service/library_api/incoming_webhook/script” endpoint. However, we are getting a CORS problem when we make the GET call to that endpoint

In the service configuration we have:

  • Authentication → System
  • HTTP method → GET
  • Request Validation → no additional authorization.

Also, in app-setting we have:

  • Allowed Request Origins

  • **http:// localhost:4200 **

  • http://<my_ip>:4200

My questions are:

  • Is it possible to make direct calls to the mongo endpoint from angular?

If it is possible,

  • What is the configuration needed to solve the CORS problem?

Thank you very much.

did you solve this? if you remove the headers from the client does it work? i have the same problem.