pinecone-io / canopy

Retrieval Augmented Generation (RAG) framework and context engine powered by Pinecone
https://www.pinecone.io/
Apache License 2.0
955 stars 118 forks source link

Issue #284 Add CORS support to handle preflight OPTIONS requests #319

Open kowshik24 opened 6 months ago

kowshik24 commented 6 months ago

Issue #284 , where the API failed to handle preflight OPTIONS requests, causing failures in direct client-to-API communications from browsers. The FastAPI application now includes CORSMiddleware, allowing proper handling of CORS preflight checks and enabling browser-based clients to directly interface with the Canopy API.

Changes:

This update ensures better accessibility and integration capabilities of the Canopy API for various client applications, especially those running in browser environments.