For my current project at work I need to ensure that all requests come from the server side. I posted a question on Stack Overflow that states this same requirement.
This example shows how I solved the problem and got all requests to occur server-side.
The starting point for this example was Zeit's custom-server-express
Next.JS example
Install dependencies:
yarn
Run app:
yarn dev
Visit page at localhost:3000
and click around. Take a look at the comments in the code, as well as your browser and terminal logs.
I want to keep this example as simple, correct, and informative as possible. If there are issues, or valuable improvements to be made, feel free to PR!