@azure/cosmos CosmosClient CORS issue

Tim Schonborn 6 Reputation points


I'm trying to connect my React app to my CosmosDB. Since I'm getting CORS preflight errors, I tried enabling cors from the portal as described here: how-to-configure-cross-origin-resource-sharing.
However, the cors tab (visible in the screenshot in the linked article) is not shown in my interface, and therefore I cannot enable it. Was it moved to somewhere else?

I'd appreciate any help on this!

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,539 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Oury Ba-MSFT 17,946 Reputation points Microsoft Employee

    Hi @Tim Schonborn Thank you for posting your question on Microsoft Q&A.

    I am able to see that from my end. CORS support is only applicable and supported for the Azure Cosmos DB Core (SQL) API. It is not applicable to the Azure Cosmos DB APIs for Cassandra, Gremlin, or MongoDB, as these protocols do not use HTTP for client-server communication.

    Could you please share a screen shot.