canopy icon indicating copy to clipboard operation
canopy copied to clipboard

Issue #284 Add CORS support to handle preflight OPTIONS requests

Open kowshik24 opened this issue 1 year ago • 0 comments

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.

kowshik24 avatar Mar 11 '24 13:03 kowshik24