Environment variables not working (Next.JS 9.4.4)

You can’t make this kind of request from the client-side without exposing your API credentials. You have to have a backend. You can use Next.js /pages/api to make a request to Contentful and then pass it to your front-end. Just create a .env file, add variables and reference it in your API route as following: … Read more