Should I create an API Token for Next.js builds?


I am building a website using Next.js for the frontend and Strapi as the backend (of course!).

I am wondering if it is a good practice to generate an API Token in order to consume it in the Next.js for build purposes.

What I mean is, instead of having all pages’ content (home, contact, about etc) publicly available, isn’t it better to have the content protected with an API Token that Next.js will use during build to create the static pages?

Is this a good practice or it is just an overkill?

Thanks in advance.

This is good pratice so that people can’t scrape your API

1 Like

Thank you for your reply @Boegie19 !