Enable basic authentication to all pages of a NextJS site
Posted on 2021-03-28 in Trucs et astuces • Tagged with devops
It's not as obvious at it seems. You can protect your API routes or some pages by following the documentation, but nothing to protect everything in one go with basic authentication (to protect your pre-production site from normal user for instance). Despite NexJS having a server component, I didn't find …
Continue reading