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.
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.