dmontagu / fastapi-utils

Reusable utilities for FastAPI
MIT License
1.91k stars 166 forks source link

[QUESTION] How to enable `CORS` for all the paths using cbv inferring routers #281

Open xalien10 opened 11 months ago

xalien10 commented 11 months ago

I was trying to use CORSMiddleware according to provided instructions. But it seems like the cbv is not allowing preflight options request by responding 405 method not allowed as I didn't add options method explicitly.

How can I use cors middleware with cbv to allow cors for any request?