How can I set max limit for API for specific content-type

make a middleware that adds your limit/rate limit