Hey com,
I struggle to disable the ratelimiter for a specific user role, because the ratelimit function is not asynchronous.
Not out of the box. However, you could likely write your own express middleware that takes the req.user into account.
Here are the docs on how to do custom middleware:
https://payloadcms.com/docs/configuration/express#custom-middlewareHere you can see where the rateLimit middleware is injected. You'd likely need to wrap that similar logic in your own middleware.
https://github.com/payloadcms/payload/blob/main/packages/payload/src/express/middleware/index.ts#L43Star
Discord
online
Get help straight from the Payload team with an Enterprise License.