You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Middleware seems to be designed to apply to my app as a whole and not to certain routes.
Use case 1: I'd like to have CORS behaviour be different depending on which route gets hit (frontend or api). Presently this seems impossible (unless I'm mistaken?)
Use case 2: (you may consider this one to be a bit dodgy): I'd like to write my auth layer as a custom middleware and not using Starlette's Auth system, and I don't want to have to re-implement the @requires system.
Middleware seems to be designed to apply to my app as a whole and not to certain routes.
Use case 1: I'd like to have CORS behaviour be different depending on which route gets hit (frontend or api). Presently this seems impossible (unless I'm mistaken?)
Use case 2: (you may consider this one to be a bit dodgy): I'd like to write my auth layer as a custom middleware and not using Starlette's Auth system, and I don't want to have to re-implement the @requires system.
EDIT: Sorry, looks like a dupe of #587 .
Important
The text was updated successfully, but these errors were encountered: