Next.js Discord

Discord Forum

how to do not enter the page

Answered
American posted this in #help-forum
Open in Discord
AmericanOP
My first time usage next js 13.4 i have API route and pages. İ created simple crud operation. I have to ask: i dont Want to somr page user enter example i have blog page i list my blogs but user shouldt enter addpost page . Just me enter addpost page . Info idont ise authentication
Answered by riský
the easiest way to do it is have a secret key that you have to input and is save in an env variable (and then validate for accessing and modifying request)
View full answer

3 Replies

Satin Angora
Unfortunately, if you can access some URL on your website, then anyone can. You need to, either, use authentication; or a CMS that is separate from main website.
the easiest way to do it is have a secret key that you have to input and is save in an env variable (and then validate for accessing and modifying request)
Answer
AmericanOP
thanks