How can I make a general middleware for authentication?
Is it possible to connect the middleware to a router or an endpoint?
One place you can do this is at the include_router level. See an example using dependencies for a router here: https://fastapi.tiangolo.com/tutorial/bigger-applications/#include-an-apirouter specifically the line dependencies=[Depends(get_token_header)],
Thanks for the idea!
Thanks for the help here @agundy ! :cake: :rocket:
Thanks @deterok for reporting back and closing the issue. :tada:
Is it possible to remove endpoint dependencies singly in this router?
This conversation is over a year old, please open a new issue.
Most helpful comment
This conversation is over a year old, please open a new issue.