Setting Up Permission Middleware for Specific Endpoints in `HttpApi`

With HttpApi, what would be the way to set up a permission middleware that checks for a specific permission depending on the endpoint? If I just create a regular HttpApiMiddleware I don't see how I would pass in what permission is required per endpoint?
Was this page helpful?