Next.js Discord

Discord Forum

protecting a certain download route

Unanswered
Thrianta posted this in #help-forum
Open in Discord
ThriantaOP
How would you go about making a protected download route in nextjs? for example, say i have an exe file, and I want to first run a check on the cookies of the request, and see if the user has purchased something which allows them to download the file. would i need to use middleware in this case, or something else? many thanks

1 Reply

you should indeed use a middlewire