Next.js Discord

Discord Forum

<Image /> Quality

Unanswered
British Shorthair posted this in #help-forum
Open in Discord
British ShorthairOP
Hi!

I'm using an open image API in Next.js that allows quality settings from 0-100. To prevent abuse, I want to restrict this to only allow qualities 60 and 80.

How can I enforce these restrictions in Next.js, possibly via middleware or API routes?

0 Replies