Skip to content
This repository has been archived by the owner on Nov 13, 2024. It is now read-only.

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

Closed
wants to merge 1 commit into from

Conversation

kowshik24
Copy link

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:

  • Added CORSMiddleware to the FastAPI application setup.
  • Configured the middleware to allow all origins, methods, and headers, facilitating cross-origin requests.

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

…quests

This commit addresses the CORS issue reported in Issue pinecone-io#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:
- Added CORSMiddleware to the FastAPI application setup.
- Configured the middleware to allow all origins, methods, and headers, facilitating cross-origin requests.

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

@miararoy miararoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@miararoy miararoy closed this Nov 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants